home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d27 / inter490.arc / INTERRUP.B < prev    next >
Text File  |  1990-08-04  |  210KB  |  5,898 lines

  1. Interrupt List, part 2 of 4
  2. This compilation is Copyright (c) 1989,1990 Ralf Brown
  3. ---------------------------------------------
  4. INT 20 - Minix - SEND/RECEIVE MESSAGE
  5.     AX = process ID of other process
  6.     BX -> message
  7.     CX = 1 send
  8.          2 receive
  9.          3 send&receive
  10. Note:    the message contains the system call number (numbered as in V7 
  11.       Unix(tm)) and the call parameters
  12. ---------------------------------------------
  13. INT 20 - DOS - PROGRAM TERMINATION
  14. returns to DOS--identical to INT 21/AH=00h
  15. Note:    IBM and Microsoft recommend using INT 21/AH=4Ch for DOS 2+
  16. SeeAlso: INT 21/AH=00h
  17. ---------------------------------------------
  18. INT 21 - DOS - PROGRAM TERMINATION
  19.     AH = 00h
  20. Return: never
  21. Note:    execution continues at address pointed to by INT 22 after DOS performs
  22.       whatever cleanup it needs to do
  23. SeeAlso: INT 20,INT 22
  24. ---------------------------------------------
  25. INT 21 - DOS - KEYBOARD INPUT
  26.     AH = 01h
  27. Return: AL = character read
  28. Note:    ^C/^Break are checked, and INT 23h executed if read
  29.     character is echoed to standard output
  30. SeeAlso: AH=06h,07h,08h,0Ah
  31. ---------------------------------------------
  32. INT 21 - DOS - DISPLAY OUTPUT
  33.     AH = 02h
  34.     DL = character to send to standard output
  35. Note:    ^C/^Break are checked, and INT 23h executed if pressed
  36. SeeAlso: AH=06h,09h
  37. ---------------------------------------------
  38. INT 21 - DOS - AUX INPUT
  39.     AH = 03h
  40. Return: AL = character read
  41. SeeAlso: AH=04h,INT 14/AH=02h
  42. ---------------------------------------------
  43. INT 21 - DOS - AUX OUTPUT
  44.     AH = 04h
  45.     DL = character to send
  46. SeeAlso: AH=03h,INT 14/AH=01h
  47. ---------------------------------------------
  48. INT 21 - DOS - PRINTER OUTPUT
  49.     AH = 05h
  50.     DL = character to print
  51. SeeAlso: INT 17/AH=00h
  52. ---------------------------------------------
  53. INT 21 - DOS - DIRECT CONSOLE I/O CHARACTER OUTPUT
  54.     AH = 06h
  55.     DL = character <> FFh
  56. SeeAlso: AH=02h,09h
  57. ---------------------------------------------
  58. INT 21 - DOS - DIRECT CONSOLE I/O CHARACTER INPUT
  59.     AH = 06h
  60.     DL = FFh
  61. Return: ZF set     = no character
  62.     ZF clear = character recieved
  63.           AL = character
  64. Notes:    character is echoed to STDOUT if received.
  65.     ^C/^Break are NOT checked
  66. SeeAlso: AH=0Bh
  67. ---------------------------------------------
  68. INT 21 - DOS - DIRECT STDIN INPUT, NO ECHO
  69.     AH = 07h
  70. Note:    same as function 06h for input but char not echoed
  71. SeeAlso: AH=01h,06h,08h,0Ah
  72. ---------------------------------------------
  73. INT 21 - DOS - KEYBOARD INPUT, NO ECHO
  74.     AH = 08h
  75. Return: AL = character
  76. Note:    same as function 07h, but ^C/^Break are checked
  77. SeeAlso: AH=01h,06h,07h,0Ah,64h
  78. ---------------------------------------------
  79. INT 21 - DOS - PRINT STRING
  80.     AH = 09h
  81.     DS:DX -> string terminated by "$"
  82. Note:    ^C/^Break checked, and INT 23h called if pressed
  83. SeeAlso: AH=02h,06h
  84. ---------------------------------------------
  85. INT 21 - DOS - BUFFERED KEYBOARD INPUT
  86.     AH = 0Ah
  87.     DS:DX -> buffer
  88. Note:    first byte of buffer must contain maximum length
  89.     on entry, second byte contains actual length of previous line which may
  90.       be recalled with the DOS line-editing commands
  91.     on return the second byte contains actual length, third and
  92.       subsequent bytes contain the input line
  93. ---------------------------------------------
  94. INT 21 - DOS - CHECK STANDARD INPUT STATUS
  95.     AH = 0Bh
  96. Return: AL = FFh if character available
  97.          00h if no character
  98. Note:    ^C/^Break checked, and INT 23h called if pressed
  99. ---------------------------------------------
  100. INT 21 - DOS - CLEAR KEYBOARD BUFFER
  101.     AH = 0Ch
  102.     AL must be 1, 6, 7, 8, or 0Ah.
  103. Notes:    flushes all typeahead input, then executes function specified by AL
  104.       (effectively moving it to AH and repeating the INT 21 call).
  105.     if AL contains a value not in the list above, the keyboard buffer is
  106.       flushed and no other action is taken.
  107. SeeAlso: AH=01h,06h,07h,08h,0Ah
  108. ---------------------------------------------
  109. INT 21 - DOS - DISK RESET
  110.     AH = 0Dh
  111. Note:    flushes all disk buffers
  112. SeeAlso: INT 13/AH=00h, INT 2F/AX=1120h
  113. ---------------------------------------------
  114. INT 21 - DOS - SELECT DISK
  115.     AH = 0Eh
  116.     DL = new default drive number (0 = A, 1 = B, etc.)
  117. Return: AL = number of logical drives
  118. Notes:    under Novell NetWare, the return value is always 32, the number of
  119.       drives that NetWare supports
  120.     under DOS 3+, the return value is the greatest of 5, the value of
  121.       LASTDRIVE= in CONFIG.SYS, and the number of drives actually present
  122.     otherwise, the return value is the highest drive actually present
  123. SeeAlso: AH=19h, AH=DBh
  124. ---------------------------------------------
  125. INT 21 - DOS - OPEN DISK FILE
  126.     AH = 0Fh
  127.     DS:DX -> FCB (see below)
  128. Return: AL = 00h file found
  129.          FFh file not found
  130. Note:    (DOS 3+) file opened in compatibility mode
  131. SeeAlso: AH=3Dh
  132.  
  133. Format of File Control Block:
  134. Offset    Size    Description
  135.  -7    BYTE    extended FCB if FFh
  136.  -6   5 BYTEs    reserved
  137.  -1    BYTE    file attribute if extended FCB
  138.  00h    BYTE    drive number (0 = default, 1 = A, etc)
  139.  01h  8 BYTEs    blank-padded file name 
  140.  09h  3 BYTEs    blank-padded file extension
  141.  0Ch    WORD    current block number
  142.  0Eh    WORD    logical record size
  143.  10h    DWORD    file size
  144.  14h    WORD    date of last write (see AX=5700h)
  145.  16h    WORD    time of last write (see AX=5700h)
  146.  18h  8 BYTEs    reserved (see below)
  147.  20h    BYTE    record within current block
  148.  21h    DWORD    random access record number (if record size is > 64 bytes, high
  149.         byte is omitted)
  150.  
  151. Format of reserved field for DOS 1.x:
  152. Offset    Size    Description
  153.  18h    BYTE    bit 7: set if logical device
  154.         bit 6: set if open???
  155.         bits 5-0: disk number or logical device ID
  156.  19h    WORD    absolute current cluster number
  157.  1Bh    WORD    starting cluster number
  158.  1Dh    WORD    relative current cluster number
  159.  1Fh    BYTE    unused???
  160.  
  161. Format of reserved field for DOS 2.x:
  162. Offset    Size    Description
  163.  18h    BYTE    bit 7: set if logical device
  164.         bit 6: set if open???
  165.         bits 5-0: ???
  166.  19h    WORD    starting cluster number
  167.  1Bh    WORD    ???
  168.  1Dh    BYTE    ???
  169.  1Eh    BYTE    ???
  170.  1Fh    BYTE    ???
  171.  
  172. Format of reserved field for DOS 3.x:
  173. Offset    Size    Description
  174.  18h    BYTE    number of system file table entry for file
  175.  19h    BYTE    attributes
  176.         bits 7,6: 00 = SHARE.EXE not loaded, disk file
  177.               01 = SHARE.EXE not loaded, character device
  178.               10 = SHARE.EXE loaded, remote file
  179.               11 = SHARE.EXE loaded, local file
  180.         bits 5-0: low six bits of device attribute word
  181. ---SHARE.EXE loaded, local file---
  182.  1Ah    WORD    starting cluster of file
  183.  1Ch    WORD    offset within SHARE of sharing record (see AH=52h)
  184.  1Eh    BYTE    file attribute
  185.  1Fh    BYTE    ???
  186. ---SHARE.EXE loaded, remote file---
  187.  1Ah    WORD    number of sector containing directory entry
  188.  1Ch    WORD    relative cluster within file of last cluster accessed
  189.  1Eh    BYTE    absolute cluster number of last cluster accessed
  190.  1Fh    BYTE    ???
  191. ---SHARE.EXE not loaded---
  192.  1Ah    BYTE    (low byte of device attribute word AND 0Ch) OR open mode
  193.  1Bh    WORD    starting cluster of file
  194.  1Dh    WORD    number of sector containing directory entry
  195.  1Fh    BYTE    number of directory entry within sector
  196. Note:    if FCB opened on character device, DWORD at 1Ah is set to the address
  197.       of the device driver header, then the BYTE at 1Ah is overwritten.
  198. ---------------------------------------------
  199. INT 21 - DOS - CLOSE DISK FILE
  200.     AH = 10h
  201.     DS:DX -> FCB (see AH=0Fh)
  202. Return: AL = 00h directory update successful
  203.          FFh file not found in directory
  204. SeeAlso: AH=3Eh
  205. ---------------------------------------------
  206. INT 21 - DOS - SEARCH FIRST USING FCB
  207.     AH = 11h
  208.     DS:DX -> FCB (see AH=0Fh)
  209. Return: AL = status
  210.         00h file found
  211.         [DTA] = unopened FCB for file that was found
  212.         FFh file not found
  213. SeeAlso: AH=1Ah,4Eh, INT 2F/AX=111Bh
  214. ---------------------------------------------
  215. INT 21 - DOS - SEARCH NEXT USING FCB
  216.     AH = 12h
  217.     DS:DX -> FCB (see AH=0Fh)
  218. Return: AL = status
  219.         00h file found
  220.         [DTA] = unopened FCB for file that was found
  221.         FFh file not found
  222. SeeAlso: AH=1Ah,4Fh, INT 2F/AX=111Ch
  223. ---------------------------------------------
  224. INT 21 - DOS - DELETE FILE via FCB
  225.     AH = 13h
  226.     DS:DX -> FCB (see AH=0Fh) with filename field filled with template for
  227.          deletion ('?' wildcard allowed, but not '*')
  228. Return: AL = status
  229.         00h file found
  230.         FFh file not found
  231. Note:    deletes everything in the current directory (including subdirectories)
  232.       and sets the first byte of the name to 00h (entry never used)
  233.       instead of E5h if called on an extended FCB with filename
  234.       '???????????' and bits 0-4 of the attribute set (bits 1 and 2 for
  235.       DOS 1).  This may have originally been an optimization to minimize
  236.       directory searching after a mass deletion, but can corrupt the
  237.       filesystem under DOS 2+ because subdirectories are removed without
  238.       deleting the files they contain.
  239. SeeAlso: AH=41h
  240. ---------------------------------------------
  241. INT 21 - DOS - SEQUENTIAL DISK FILE READ
  242.     AH = 14h
  243.     DS:DX -> FCB (see AH=0Fh)
  244. Return: AL = status
  245.         00h successful read
  246.         01h end of file
  247.         02h data transfer area too small
  248.         03h partial record, EOF
  249. SeeAlso: AH=3Fh, INT 2F/AX=1108h
  250. ---------------------------------------------
  251. INT 21 - DOS - SEQUENTIAL DISK RECORD WRITE
  252.     AH = 15h
  253.     DS:DX -> FCB (see AH=0Fh)
  254. Return: AL = status
  255.         00h successful write
  256.         01h disk full
  257.         02h data transfer area too small
  258. SeeAlso: AH=40h, INT 2F/AX=1109h
  259. ---------------------------------------------
  260. INT 21 - DOS - CREATE A DISK FILE
  261.     AH = 16h
  262.     DS:DX -> FCB (see AH=0Fh)
  263. Return: AL = status
  264.         00h successful creation
  265.         FFh directory full
  266. Note:    if file already exists, it is truncated to zero length
  267. SeeAlso: AH=3Ch
  268. ---------------------------------------------
  269. INT 21 - DOS - RENAME FILE via FCB
  270.     AH = 17h
  271.     DS:DX -> FCB (see AH=0Fh)
  272.     FCB contains new name starting at byte 17h.
  273. Return: AL = status
  274.         00h file found
  275.         FFh file not found
  276. SeeAlso: AH=56h
  277. ---------------------------------------------
  278. INT 21 - DOS internal - UNUSED
  279.     AH = 18h
  280. Return: AL = 00h
  281. ---------------------------------------------
  282. INT 21 - DOS - GET DEFAULT DISK NUMBER
  283.     AH = 19h
  284. Return: AL = current drive number (letter - 'A')
  285. SeeAlo: AH=0Eh
  286. ---------------------------------------------
  287. INT 21 - DOS - SET DISK TRANSFER AREA ADDRESS
  288.     AH = 1Ah
  289.     DS:DX -> disk transfer buffer
  290. SeeAlso: AH=2Fh
  291. ---------------------------------------------
  292. INT 21 - DOS - GET ALLOCATION TABLE INFORMATION FOR DEFAULT DRIVE
  293.     AH = 1Bh
  294. Return: DS:BX -> FAT ID byte for default drive
  295.     DX = number of allocation units on disk
  296.     AL = number of sectors per allocation unit (cluster)
  297.     CX = number of bytes per sector
  298. Note:    under DOS 1.x, DS:BX points at an actual copy of the FAT
  299. SeeAlso: AH=36h
  300. ---------------------------------------------
  301. INT 21 - DOS - GET ALLOCATION TABLE INFORMATION FOR SPECIFIC DRIVE
  302.     AH = 1Ch
  303.     DL = drive number to check (0=default, 1=A, etc)
  304. Return: DS:BX -> FAT ID byte for specified drive
  305.     DX = number of allocation units on disk
  306.     AL = number of sectors per allocation unit (cluster)
  307.     CX = number of bytes per sector
  308. Note:    under DOS 1.x, DS:BX points at an actual copy of the FAT
  309. SeeAlso: AH=36h
  310. ---------------------------------------------
  311. INT 21 - DOS internal - UNUSED
  312.     AH = 1Dh
  313. Return: AL = 00h
  314. ---------------------------------------------
  315. INT 21 - DOS internal - UNUSED
  316.     AH = 1Eh
  317. Return: AL = 00h
  318. ---------------------------------------------
  319. INT 21 - DOS internal - GET DEFAULT DRIVE PARAMETER BLOCK
  320.     AH = 1Fh
  321. Return: AL = 00h No Error
  322.          FFh Error
  323.     DS:BX -> drive parameter block (see below for DOS 1.x, AH=32h others)
  324. Note:    for DOS 2+, this just invokes function 32h with DL = 00h
  325. SeeAlso: AH=32h
  326.  
  327. Format of Eagle MSDOS 1.25 drive parameter block:
  328. Offset    Size    Description
  329.  00h    BYTE    entry number
  330.  01h    BYTE    physical drive number
  331.  02h    WORD    bytes per sector
  332.  04h    BYTE    number of sectors per cluster - 1
  333.  05h    BYTE    ???
  334.  06h    WORD    starting sector number of first FAT
  335.  08h    BYTE    number of copies of FAT
  336.  09h    WORD    number of directory entries
  337.  0Bh    WORD    number of first data sector
  338.  0Dh    WORD    number of clusters on disk
  339.  0Fh    BYTE    sectors per FAT
  340.  10h    WORD    starting sector of directory
  341.  12h    WORD    address of allocation table
  342. ---------------------------------------------
  343. INT 21 - DOS internal - UNUSED
  344.     AH = 20h
  345. Return: AL = 00h
  346. ---------------------------------------------
  347. INT 21 - DOS - RANDOM DISK RECORD READ
  348.     AH = 21h
  349.     DS:DX -> FCB (see AH=0Fh)
  350. Return: AL = status
  351.         00h successful read
  352.         01h end of file
  353.         02h data transfer area too small
  354.         03h partial record, EOF
  355. SeeAlso: AH=3Fh
  356. ---------------------------------------------
  357. INT 21 - DOS - RANDOM DISK RECORD WRITE
  358.     AH = 22h
  359.     DS:DX -> FCB (see AH=0Fh)
  360. Return: AL = status
  361.         00h successful write
  362.         01h disk full
  363.         02h data transfer area too small
  364. SeeAlso: AH=40h
  365. ---------------------------------------------
  366. INT 21 - DOS - GET FILE SIZE
  367.     AH = 23h
  368.     DS:DX -> unopened FCB (see AH=0Fh) with filename and record size
  369.          fields initialized
  370. Return: AL = status
  371.         00h file found
  372.         FFh file not found
  373. Note:    FCB's random-record field set to number of records (rounded up)
  374. SeeAlso: AH=42h
  375. ---------------------------------------------
  376. INT 21 - DOS - SET RANDOM RECORD FIELD
  377.     AH = 24h
  378.     DS:DX -> open FCB (see AH=0Fh)
  379. Return: Random Record Field of FCB is set to be same as Current Block
  380.     and Current Record.
  381. SeeAlso: AH=42h
  382. ---------------------------------------------
  383. INT 21 - DOS - SET INTERRUPT VECTOR
  384.     AH = 25h
  385.     AL = interrupt number
  386.     DS:DX = new vector to be used for specified interrupt
  387. SeeAlso: AH=35h
  388. ---------------------------------------------
  389. INT 21 - Phar Lap 386/DOS-Extender - RESET 386/DOS-EXTENDER DATA STRUCTURES 
  390.     AX = 2501h
  391. Return: CF clear
  392. Note:    Phar Lap uses INT 21/AH=25h as the entry point for all 386/DOS-Extender
  393.       system calls.  Only available when directly using 386/DOS-Extender,
  394.       or when using a product that was created using 386-DOS/Extender
  395. ---------------------------------------------
  396. INT 21 - Phar Lap 386/DOS-Extender - GET PROTECTED-MODE INTERRUPT VECTOR
  397.     AX = 2502h
  398.     CL = interrupt number
  399. Return: ES:EBX -> 48-bit address of protected-mode interrupt handler
  400.     CF clear
  401. ---------------------------------------------
  402. INT 21 - Phar Lap 386/DOS-Extender - GET REAL-MODE INTERRUPT VECTOR
  403.     AX = 2503h
  404.     CL = interrupt number
  405. Return: EBX = 32-bit address of real-mode interrupt handler
  406.     CF clear
  407. SeeAlso: AX=2502h,2504h
  408. ---------------------------------------------
  409. INT 21 - Phar Lap 386/DOS-Extender - SET PROTECTED-MODE INTERRUPT VECTOR
  410.     AX = 2504h
  411.     CL = interrupt number
  412.     DS:EDX -> 48-bit address of protected-mode interrupt handler
  413. Return: CF clear
  414. SeeAlso: AX=2502h,2505h
  415. ---------------------------------------------
  416. INT 21 - Phar Lap 386/DOS-Extender - SET REAL-MODE INTERRUPT VECTOR
  417.     AX = 2505h
  418.     CL = interrupt number
  419.     EBX = 32-bit address of real-mode interrupt handler
  420. Return: CF clear
  421. SeeAlso: AX=2503h,2504h
  422. ---------------------------------------------
  423. INT 21 - Phar Lap 386/DOS-Extender - SET INT TO ALWAYS GAIN CONTRL IN PROT MODE
  424.     AX = 2506h
  425.     CL = interrupt number
  426.     DS:EDX -> 48-bit address of protected-mode interrupt handler
  427. Return: CF clear
  428. Note:    This function modifies both the real-mode low-memory interrupt
  429.       vector table and the protected-mode Interrupt Descriptor Table (IDT)
  430.     Interrupts occurring in real mode are resignaled in protected mode.
  431. ---------------------------------------------
  432. INT 21 - Phar Lap 386/DOS-Extender - SET REAL- & PROTECTED-MODE INT VECTORS
  433.     AX = 2507h
  434.     CL = interrupt number
  435.     DS:EDX -> 48-bit address of protected-mode interrupt handler
  436.     EBX = 32-bit address of real-mode interrupt handler
  437. Return: CF clear
  438. Note:    interrupts are disabled until both vectors have been modified
  439. SeeAlso: AX=2504h,2505h
  440. ---------------------------------------------
  441. INT 21 - Phar Lap 386/DOS-Extender - GET SEGMENT LINEAR BASE ADDRESS
  442.     AX = 2508h
  443.     BX = segment selector
  444. Return: CF clear if successful
  445.         ECX = linear base address of segment
  446.     CF set if invalid segment selector
  447. ---------------------------------------------
  448. INT 21 - Phar Lap 386/DOS-Extender - CONVERT LINEAR TO PHYSICAL ADDRESS
  449.     AX = 2509h
  450.     EBX = linear address to convert
  451. Return: CF clear if successful
  452.         ECX = physical address (carry flag clear)
  453.     CF set if linear address not mapped in page tables
  454. ---------------------------------------------
  455. INT 21 - Phar Lap 386/DOS-Extender - MAP PHYSICAL MEMORY AT END OF SEGMENT
  456.     AX = 250Ah
  457.     ES = segment selector in the Local Descriptor Table (LDT) of segment
  458.          to modify
  459.     EBX = physical base address of memory to map (multiple of 4K)
  460.     ECX = number of physical 4K pages to map
  461. Return: CF clear if successful
  462.         EAX = 32-bit offset in segment of mapped memory
  463.     CF set on error
  464.         EAX = error code
  465.         08h insufficient memory to create page tables
  466.         09h invalid segment selector
  467. ---------------------------------------------
  468. INT 21 - Phar Lap 386/DOS-Extender - GET HARDWARE INTERRUPT VECTORS
  469.     AX = 250Ch
  470. Return: CF clear
  471.     AL = base interrupt vector for IRQ0-IRQ7
  472.     AH = base interrupt vector for IRQ8-IRQ15
  473.     BL = interrupt vector for BIOS print screen function
  474. ---------------------------------------------
  475. INT 21 - Phar Lap 386/DOS-Extender - GET REAL-MODE LINK INFORMATION
  476.     AX = 250Dh
  477. Return: CF clear
  478.     EAX = 32-bit address of real-mode 386/DOS-Extender proc that will call
  479.           through from real mode to a protected-mode routine
  480.     EBX = 32-bit real-mode address of intermode call data buffer
  481.     ECX = size in bytes of intermode call data buffer
  482.     ES:EDX -> protected-mode address of intermode call data buffer
  483. ---------------------------------------------
  484. INT 21 - Phar Lap 386/DOS-Extender - CALL REAL-MODE PROCEDURE
  485.     AX = 250Eh
  486.     EBX = 32-bit address of real-mode procedure to call
  487.     ECX = number of two-byte words to copy from protected-mode stack
  488.           to real-mode stack
  489. Return: CF clear if successful
  490.         all segment registers unchanged
  491.         all general registers contain values set by real-mode procedure
  492.         all other flags set as they were left by real-mode procedure
  493.     CF set on error
  494.         EAX = error code
  495.         01h not enough real-mode stack space
  496. ---------------------------------------------
  497. INT 21 - Phar Lap 386/DOS-Extender - CONVERT PROTECTED-MODE ADDRESS TO MS-DOS
  498.     AX = 250Fh
  499.     ES:EBX -> 48-bit protected-mode address to convert
  500.     ECX = length of data, in bytes
  501. Return: CF clear if successful
  502.         ECX = 32-bit MS-DOS address
  503.     CF set on error
  504.         ECX destroyed
  505. SeeAlso: AX=2510h
  506. ---------------------------------------------
  507. INT 21 - Phar Lap 386/DOS-Extender - CALL REAL-MODE PROCEDURE, REGISTERS
  508.     AX = 2510h
  509.     EBX = 32-bit address of real-mode procedure to call
  510.     ECX = number of two-byte words to copy to protected-mode stack to
  511.           real-mode stack
  512.     DS:EDX -> pointer to parameter block (see below)
  513. Return: CF clear if successful
  514.         all segment registers unchanged,
  515.         EDX unchanged
  516.         all other general registers contain values set by real-mode proc
  517.         all other flags are set as they were left by real-mode procedure
  518.         real-mode register values are returned in the parameter block
  519.     CF set on error
  520.         EAX = error code
  521.         01h not enough real-mode stack space
  522. SeeAlso: AX=250Fh
  523.  
  524. Format of parameter block:
  525. Offset    Size    Description
  526.  00h    WORD    real-mode DS value
  527.  02h    WORD    real-mode ES value
  528.  04h    WORD    real-mode FS value
  529.  06h    WORD    real-mode GS value
  530.  08h    DWORD    real-mode EAX value
  531.  0Ch    DWORD    real-mode EBX value
  532.  10h    DWORD    real-mode ECX value
  533.  14h    DWORD    real-mode EDX value
  534. ---------------------------------------------
  535. INT 21 - Phar Lap 386/DOS-Extender - ISSUE REAL-MODE INTERRUPT
  536.     AX = 2511h
  537.     DS:EDX -> pointer to parameter block (see below)
  538. Return: all segment registers unchanged
  539.     EDX unchanged
  540.     all other registers contain values set by the real-mode int handler
  541.     the flags are set as they were left by the real-mode interrupt handler
  542.     real-mode register values are returned in the parameter block
  543. SeeAlso: AX=2503h,2505h
  544.  
  545. Format of parameter block:
  546. Offset    Size    Description
  547.  00h    WORD    interrupt number
  548.  02h    WORD    real-mode DS value
  549.  04h    WORD    real-mode ES value
  550.  06h    WORD    real-mode FS value
  551.  08h    WORD    real-mode GS value
  552.  0Ah    DWORD    real-mode EAX value
  553.  0Eh    DWORD    real-mode EDX value
  554. Note: all other real-mode values set from protected-mode registers
  555. ---------------------------------------------
  556. INT 21 - Phar Lap 386/DOS-Extender - LOAD PROGRAM FOR DEBUGGING
  557.     AX = 2512h
  558.     DS:EDX -> pointer to ASCIIZ program name
  559.     ES:EBX -> pointer to parameter block (see below)
  560.     ECX = size in bytes of LDT buffer
  561. Return: CF clear if successful
  562.         EAX = number of segment descriptors in LDT
  563.     CF set on error
  564.         EAX = error code
  565.         02h file not found or path invalid
  566.         05h access denied
  567.         08h insufficient memory
  568.         0Ah environment invalid
  569.         0Bh invalid file format
  570.         80h LDT too small
  571.  
  572. Format of parameter block:
  573. Offset    Size    Description
  574. Input:
  575.  00h    DWORD    32-bit offset of environment string
  576.  04h    WORD    segment of environment string
  577.  06h    DWORD    32-bit offset of command-tail string
  578.  0Ah    WORD    segment of command-tail string
  579.  0Ch    DWORD    32-bit offset of LDT buffer (size in ECX)
  580.  10h    WORD    segment of LDT buffer
  581. Output:
  582.  12h    WORD    real-mode paragraph address of PSP (see also AH=26h)
  583.  14h    WORD    real/protected mode flag
  584.         0000h  real mode
  585.         0001h  protected mode
  586.  16h    DWORD    initial EIP value
  587.  1Ah    WORD    initial CS value
  588.  1Ch    DWORD    initial ESP value
  589.  20h    WORD    initial SS value
  590.  22h    WORD    initial DS value
  591.  24h    WORD    initial ES value
  592.  26h    WORD    initial FS value
  593.  28h    WORD    initial GS value
  594. ---------------------------------------------
  595. INT 21 - Phar Lap 386/DOS-Extender - ALIAS SEGMENT DESCRIPTOR
  596.     AX = 2513h
  597.     BX = segment selector of descriptor in GDT or LDT
  598.     CL = access-rights byte for alias descriptor
  599.     CH = use-type bit (USE16 or USE32) for alias descriptor
  600. Return: CF clear if successful
  601.         AX = segment selector for created alias
  602.     CF set on error
  603.         EAX = error code
  604.         08h insufficient memory (can't grow LDT)
  605.         09h invalid segment selector in BX
  606. ---------------------------------------------
  607. INT 21 - Phar Lap 386/DOS-Extender - CHANGE SEGMENT ATTRIBUTES
  608.     AX = 2514h
  609.     BX = segment selector of descriptor in GDT or LDT
  610.     CL = new access-rights byte 
  611.     CH = new use-type bit (USE16 or USE32)
  612. Return: CF clear if successful
  613.     CF set on error
  614.         EAX = error code
  615.         09h invalid selector in BX
  616. SeeAlso: AX=2515h
  617. ---------------------------------------------
  618. INT 21 - Phar Lap 386/DOS-Extender - GET SEGMENT ATTRIBUTES
  619.     AX = 2515h
  620.     BX = segment selector of descriptor in GDT or LDT
  621. Return: CF clear if successful
  622.         CL = access-rights byte for segment
  623.         CH = use-type bit (USE16 or USE32)
  624.     ECX<16-31> destroyed
  625.     CF set on error
  626.         EAX = error code
  627.         09h invalid segment selector in BX
  628. SeeAlso: AX=2514h
  629. ---------------------------------------------
  630. INT 21 - Phar Lap 386/DOS-Extender - FREE ALL MEMORY OWNED BY LDT
  631.     AX = 2516h
  632.     ???
  633. Return: ???
  634. ---------------------------------------------
  635. INT 21 - Phar Lap 386/DOS-Extender - GET INFO ON DOS DATA BUFFER
  636.     AX = 2517h
  637.     ???
  638. Return: ???
  639. ---------------------------------------------
  640. INT 21 - Phar Lap 386/DOS-Extender - SPECIFY HANDLER FOR MOVED SEGMENTS
  641.     AX = 2518h
  642.     ???
  643. Return: ???
  644. ---------------------------------------------
  645. INT 21 - Phar Lap 386/DOS-Extender VMM - GET ADDITIONAL MEMORY ERROR INFO
  646.     AX = 2519h
  647. Return: CF clear
  648.     EAX = error code
  649.         0000h  no error
  650.         0001h  out of physical memory
  651.         0002h  out of swap space (unable to grow swap file)
  652.         0003h  out of LDT entries and unable to grow LDT
  653.         0004h  unable to change extended memory allocation mark
  654.         FFFFFFFFh    paging disabled
  655. Note:    VMM is the Virtual Memory Manager option
  656. ---------------------------------------------
  657. INT 21 - Phar Lap 386/DOS-Extender VMM - LOCK PAGES IN MEMORY
  658.     AX = 251Ah
  659.     EDX = number of 4k pages to lock
  660.     if BL = 00h
  661.         ECX = linear address of first page to lock
  662.     if BL = 01h
  663.         ES:ECX -> pointer to first page to lock
  664. Return: CF clear if successful
  665.     CF set on error
  666.         EAX = error code
  667.         08h insufficient memory
  668.         09h invalid address range
  669. SeeAlso: AX=251Bh
  670. ---------------------------------------------
  671. INT 21 - Phar Lap 386/DOS-Extender VMM - UNLOCK PAGES
  672.     AX = 251Bh
  673.     EDX = number of pages to unlock
  674.     if BL = 00h
  675.         ECX = linear address of first page to unlock
  676.     if BL = 01h
  677.         ES:ECX -> pointer to first page to unlock
  678. Return: CF clear if successful
  679.     CF set on error
  680.         EAX = error code
  681.         09h invalid address range
  682. SeeAlso: AX=251Ah
  683. ---------------------------------------------
  684. INT 21 - Phar Lap 386/DOS-Extender VMM - READ PAGE-TABLE ENTRY
  685.     AX = 251Dh
  686.     ???
  687. Return: ???
  688. ---------------------------------------------
  689. INT 21 - Phar Lap 386/DOS-Extender VMM - WRITE PAGE-TABLE ENTRY
  690.     AX = 251Eh
  691.     ???
  692. Return: ???
  693. ---------------------------------------------
  694. INT 21 - Phar Lap 386/DOS-Extender VMM - EXHANGE TWO PAGE-TABLE ENTRIES
  695.     AX = 251Fh
  696.     ???
  697. Return: ???
  698. ---------------------------------------------
  699. INT 21 - Phar Lap 386/DOS-Extender VMM - GET MEMORY STATISTICS
  700.     AX = 2520h
  701.     DS:EDX -> pointer to buffer at least 100 bytes in size (see below)
  702.     BL = 0 (don't reset VM stats), 1 (reset VM stats)
  703. Return: carry flag clear    
  704.  
  705. Format of VM stats buffer:
  706. Offset    Size    Description
  707.  00h    DWORD    VM status
  708.         0001h VM subsystem is present
  709.         0000h VM not present
  710.  04h    DWORD    "nconvpg" number of conventional memory pages available
  711.  08h    DWORD    "nbimpg" number of Compaq built-in memory pages available
  712.  0Ch    DWORD    "nextpg" total number of extended memory pages
  713.  10h    DWORD    "extlim" extender memory pages limit
  714.  14h    DWORD    "aphyspg" number of physical memory pages allocated to appl
  715.  18h    DWORD    "alockpg" number of locked pages owned by application
  716.  1Ch    DWORD    "sysphyspg" number physical memory pages allocated to system
  717.  20h    DWORD    "nfreepg" number of free physical pages; approx if EMS VCPI
  718.  24h    DWORD    linear address of beginning of application address space
  719.  28h    DWORD    linear address of end of application address space
  720.  2Ch    DWORD    number of seconds since last time VM stats were reset
  721.  30h    DWORD    number of page faults since last time
  722.  34h    DWORD    number of pages written to swap file since last time
  723.  38h    DWORD    number of reclaimed pages (page faults on swapped pages)
  724.  3Ch    DWORD    number of virtual pages allocated to the application
  725.  40h    DWORD    size in pages of swap file
  726.  44h    DWORD    number of system pages allocated with EMS calls
  727.  48h    DWORD    minimum number of conventional memory pages
  728.  4Ch    DWORD    maximum size in bytes to which swap file can be increased
  729.  50h    DWORD    "vmflags" bit 0 = 1 if page fault in progress
  730.  54h 16 BYTEs    reserved for future expansion (set to zero)
  731. ---------------------------------------------
  732. INT 21 - Phar Lap 386/DOS-Extender VMM - LIMIT PROGRAM'S EXTENDED MEMORY USAGE
  733.     AX = 2521h
  734.     EBX = max 4k pages of physical extended memory which program may use
  735. Return: CF clear if successful
  736.        EBX = maximum limit in pages
  737.        ECX = minimum limit in pages
  738.     CF set on error
  739.         EAX = error code
  740.         08h insufficient memory or -nopage switch used
  741. SeeAlso: AX=2522h
  742. ---------------------------------------------
  743. INT 21 - Phar Lap 386/DOS-Extender VMM - SPECIFY ALTERNATE PAGE-FAULT HANDLER
  744.     AX = 2522h
  745.     ???
  746. Return: ???
  747. ---------------------------------------------
  748. INT 21 - Phar Lap 386/DOS-Extender VMM - SPECIFY OUT-OF-SWAP-SPACE HANDLER
  749.     AX = 2523h
  750.     ???
  751. Return: ???
  752. ---------------------------------------------
  753. INT 21 - Phar Lap 386/DOS-Extender VMM - INSTALL PAGE-REPLACEMENT HANDLERS
  754.     AX = 2524h
  755.     ???
  756. Return: ???
  757. ---------------------------------------------
  758. INT 21 - Phar Lap 386/DOS-Extender VMM - LIMIT PROGRAM'S CONVENTIONAL MEM USAGE
  759.     AX = 2525h
  760.     EBX = limit in 4k pages of physical conventional memory which program 
  761.           may use
  762. Return: CF clear if successful
  763.         EBX = maximum limit in pages
  764.         ECX = minimum limit in pages
  765.     CF set on error
  766.         EAX = error code
  767.         08h insufficient memory or -nopage switch used
  768. SeeAlso: AX=2521h
  769. ---------------------------------------------
  770. INT 21 - Phar Lap 386/DOS-Extender - GET CONFIGURATION INFORMATION
  771.     AX = 2526h
  772.     ???
  773. Return: ???
  774. ---------------------------------------------
  775. INT 21 - Phar Lap 386/DOS-Extender - ALLOCATE MS-DOS MEMORY BLOCK
  776.     AX = 25C0h
  777.     BX = number of 16-byte paragraphs of MS-DOS memory requested
  778. Return: CF clear if successful
  779.         AX = real-mode paragraph address of memory
  780.     CF set on error
  781.         AX = error code
  782.         07h MS-DOS memory control blocks destroyed
  783.         08h insufficient memory
  784.         BX = size in paragraphs of largest available memory block
  785. SeeAlso: AX=25C1h,25C2h
  786. ---------------------------------------------
  787. INT 21 - Phar Lap 386/DOS-Extender - RELEASE MS-DOS MEMORY BLOCK
  788.     AX = 25C1h
  789.     CX = real-mode paragraph address of memory block to free
  790. Return: CF clear if successful
  791.         EAX destroyed
  792.     CF set on error
  793.         AX = error code
  794.         07h MS-DOS memory control blocks destroyed
  795.         09h invalid memory block address in CX
  796. SeeAlso: AX=25C0h,25C2h
  797. ---------------------------------------------
  798. INT 21 - Phar Lap 386/DOS-Extender - MODIFY MS-DOS MEMORY BLOCK
  799.     AX = 25C2h
  800.     BX = new requested block size in paragraphs
  801.     CX = real-mode paragraph address of memory block to modify
  802. Return: CF clear if successful
  803.         EAX destroyed
  804.     CF set on error
  805.         AX = error code
  806.         07h MS-DOS memory control blocks destroyed
  807.         08h insufficient memory
  808.         09h invalid memory block address in CX
  809.         BX = size in paragraphs of largest available memory block
  810. SeeAlso: AX=25C0h,25C1h
  811. ---------------------------------------------
  812. INT 21 - Phar Lap 386/DOS-Extender - EXECUTE PROGRAM
  813.     AX = 25C3h
  814.     ES:EBX -> pointer to parameter block (see below)
  815.     DS:EDX -> pointer to ASCIIZ program filename
  816. Return: CF clear if successful
  817.         all registers unchanged
  818.     CF set on error
  819.         EAX = error code
  820.         01h function code in AL is invalid ???
  821.         02h file not found or path invalid
  822.         05h access denied
  823.         08h insufficient memory to load program
  824.         0Ah environment invalid
  825.         0Bh invalid file format
  826.  
  827. Format of parameter block:
  828. Offset    Size    Description
  829.  00h    DWORD    32-bit offset of environment string
  830.  04h    WORD    segment selector of environment string
  831.  06h    DWORD    32-bit offset of command-tail string
  832.  0Ah    WORD    segment selector of command-tail string
  833. ---------------------------------------------
  834. INT 21 - DOS - CREATE PSP
  835.     AH = 26h
  836.     DX = segment number at which to set up PSP
  837. Return: current PSP is copied to specified segment
  838. Notes:    new PSP is updated with memory size information; INTs 22h, 23h, 24h
  839.       taken from interrupt vector table
  840.     (DOS 2+) DOS assumes that the caller's CS is the segment of the PSP to
  841.       copy
  842. SeeAlso: AH=50h,51h,55h,62h,67h
  843.  
  844. Format of PSP:
  845. Offset    Size    Description
  846.  00h  2 BYTEs    program exit point (INT 20h instruction)
  847.  02h      WORD    memory size in paragraphs
  848.  04h    BYTE    unused
  849.  05h  5 BYTEs    CP/M entry point (FAR jump to 000C0h)
  850.         BUG: (DOS 2+) PSPs created by INT 21/AH=4Bh point at 000BEh
  851.  06h    WORD    CP/M compatibility--size of first segment for .COM files
  852.  0Ah    DWORD    terminate address (old INT 22h)
  853.  0Eh    DWORD    break address (old INT 23h)
  854.  12h    DWORD    critical error handler (old INT 24h)
  855.  16h    WORD    parent PSP segment
  856.  18h 20 BYTEs    DOS 2+ open file table, FFh = unused
  857.  2Ch    WORD    DOS 2+ environment segment (see below)
  858.  2Eh    DWORD    DOS 2+ process's SS:SP on entry to last INT 21 call
  859.  32h    WORD    DOS 3+ max open files
  860.  34h    DWORD    DOS 3+ open file table address
  861.  38h    DWORD    DOS 3+ pointer to previous PSP (default FFFFFFFFh in 3.x)
  862.         used by SHARE in DOS 3.3
  863.  3Ch 20 BYTEs    unused by DOS versions <= 4.01
  864.  50h  3 BYTEs    DOS function dispatcher (FAR routine)--CDh 21h CBh
  865.  53h  9 BYTEs    unused
  866.  5Ch 16 BYTEs    FCB #1 (see AH=0Fh), filled in from first commandline argument
  867.         (when opened, overwrites following FCB)
  868.  6Ch 20 BYTEs    FCB #2 (see AH=0Fh), filled in from second commandline argument
  869.         (when opened, overwrites part of command tail)
  870.  80h 128 BYTEs    command tail / default DTA buffer
  871.         command tail is BYTE for length of tail, N BYTEs for the tail,
  872.         followed by a BYTE containing 0Dh
  873. Notes:    in DOS versions 3.0 and up, the limit on simultaneously open files may
  874.       be increased by allocating memory for a new open file table, filling
  875.       it with FFh, copying the first 20 bytes from the default table, and
  876.       adjusting the pointer and count at 34h and 32h.  However, DOS
  877.       versions through  at least 3.30 will only copy the first 20 file
  878.       handles into a child PSP (including the one created on EXEC).
  879.     network redirectors based on the original MS-Net implementation use
  880.       values of 80h-FEh in the open file table to indicate remote files
  881.  
  882. Format of environment block:
  883. Offset    Size    Description
  884.  00h  N BYTEs    first environment variable, ASCIZ string of form "var=value"
  885.       N BYTEs    second environment variable, ASCIZ string
  886.     ...
  887.       N BYTEs    last environment variable, ASCIZ string of form "var=value"
  888.     BYTE    00h
  889. ---DOS 3+---
  890.     WORD    number of strings following environment (normally 1)
  891.       N BYTEs    ASCIZ full pathname of program owning this environment
  892.         other strings may follow
  893. ---------------------------------------------
  894. INT 21 - DOS - RANDOM BLOCK READ
  895.     AH = 27h
  896.     DS:DX -> FCB (see AH=0Fh)
  897.     CX = number of records to be read
  898. Return: AL = status
  899.         00h successful read
  900.         01h end of file
  901.         02h data transfer area too small
  902.         03h partial record, EOF
  903. SeeAlso: AH=3Fh
  904. ---------------------------------------------
  905. INT 21 - DOS - RANDOM BLOCK WRITE
  906.     AH = 28h
  907.     DS:DX -> FCB (see AH=0Fh)
  908.     CX = number of records to be written
  909.          if zero, truncate file to current random file position
  910. Return: AL = status
  911.         00h successful write
  912.         01h disk full
  913.         02h data transfer area too small
  914. SeeAlso: AH=40h
  915. ---------------------------------------------
  916. INT 21 - DOS - PARSE FILENAME
  917.     AH = 29h
  918.     DS:SI -> string to parse
  919.     ES:DI -> buffer to fill with unopened FCB (see AH=0Fh)
  920.     AL = bit mask to control parsing
  921.         0 = 0: parsing stops if file separator found
  922.         1: leading separators ignored
  923.         1 = 0: drive number in FCB set to default drive if not present
  924.            in string
  925.         1: drive number in FCB not changed
  926.         2 = 0: filename in FCB set to blanks if no filename in string
  927.         1: filename in FCB not changed if string does not contain
  928.            a filename
  929.         3 = 0: extension in FCB set to blanks if no extension in string
  930.         1: extension left unchanged
  931. Return: AL = 00h no wildcards in name or extension
  932.          01h wildcards appeared
  933.          FFh drive specifier invalid
  934.     DS:SI -> first byte after parsed string
  935.     ES:DI buffer filled with unopened FCB
  936. Notes:    asterisks expanded to question marks in the FCB
  937.     all processing stops when a filename terminator is encountered
  938.     cannot be used with filespecs which include a path (DOS 2+)
  939. ---------------------------------------------
  940. INT 21 - DOS - GET CURRENT DATE
  941.     AH = 2Ah
  942. Return: DL = day
  943.     DH = month
  944.     CX = year
  945.     AL = day of the week (0=Sunday, 1=Monday, etc.)
  946. SeeAlso: AH=E7h,INT 1A/AH=04h
  947. ---------------------------------------------
  948. INT 21 - DOS - SET CURRENT DATE
  949.     AH = 2Bh
  950.     DL = day
  951.     DH = month
  952.     CX = year
  953. Return: AL = 00h if no error
  954.        = FFh if bad value sent to routine
  955. Note:    DOS 3.3+ also sets CMOS clock
  956. SeeAlso: INT 1A/AH=05h
  957. ---------------------------------------------
  958. INT 21 - DESQview - INSTALLATION CHECK
  959.     AH = 2Bh
  960.     AL = subfunction (DV v2.00+)
  961.         01h get version
  962.         Return: BX = version (BH = major, BL = minor)
  963.         Note: early copies of v2.00 return 0002h
  964.         02h get shadow buffer info, and start shadowing
  965.         Return: BH = rows in shadow buffer
  966.             BL = columns in shadow buffer
  967.             DX = segment of shadow buffer
  968.         04h get shadow buffer info
  969.         Return: BH = rows in shadow buffer
  970.             BL = columns in shadow buffer
  971.             DX = segment of shadow buffer
  972.         05h stop shadowing
  973.     CX = 4445h ('DE')
  974.     DX = 5351h ('SQ')
  975. Return: AL = FFh if DESQview not installed
  976. Note:    in DESQview v1.x, there were no subfunctions; this call only identified
  977.     whether or not DESQview was loaded
  978. SeeAlso: INT 10/AH=FEh,FFh
  979. ---------------------------------------------
  980. INT 21 - PC Tools v5.1 PC-CACHE - INSTALLATION CHECK
  981.     AH = 2Bh
  982.     CX = 4358h ('CX')
  983. Return: AL = FFh if PC-CACHE not installed
  984.     AL = 00h if installed
  985.         CX = 6378h ('cx')
  986.         BX = ???
  987.         DX = ???
  988. ---------------------------------------------
  989. INT 21 - TAME v2.10 - INSTALLATION CHECK
  990.     AX = 2B01h
  991.     CX = 5441h ('TA')
  992.     DX = 4D45h ('ME')
  993. Return: AL = 02h if installed
  994.     ES:DX -> data area in TAME-RES (see below)
  995. Note:    TAME is a shareware program by David G. Thomas which gives up CPU time
  996.       to other partitions under a multitasker when the current partition's
  997.       program incessantly polls the keyboard or system time
  998.  
  999. Format of TAME 2.10-2.20 data area:
  1000. Offset    Size    Description
  1001.  00h    BYTE    data structure minor version number (01h in TAME 2.20)
  1002.  01h    BYTE    data structure major version number (07h in TAME 2.20)
  1003.  02h    DWORD    number of task switches
  1004.  06h    DWORD    number of keyboard polls
  1005.  0Ah    DWORD    number of time polls
  1006.  0Eh    DWORD    number of times DESQview told program runs only in foreground
  1007.  12h    DWORD    original INT 10h
  1008.  16h    DWORD    original INT 14h
  1009.  1Ah    DWORD    original INT 15h
  1010.  1Eh    DWORD    original INT 16h
  1011.  22h    DWORD    original INT 17h
  1012.  26h    DWORD    original INT 21h
  1013.  2Ah    DWORD    original INT 28h
  1014.  2Eh    WORD    offset of TAME INT 10h handler
  1015.  30h    WORD    offset of TAME INT 14h handler
  1016.  32h    WORD    offset of TAME INT 15h handler
  1017.  34h    WORD    offset of TAME INT 16h handler
  1018.  36h    WORD    offset of TAME INT 17h handler
  1019.  38h    WORD    offset of TAME INT 21h handler
  1020.  3Ah    WORD    offset of TAME INT 28h handler
  1021.  3Ch    WORD    X in /max:X,Y or /freq:X,Y
  1022.  3Eh    WORD    Y in /max:X,Y or /freq:X,Y
  1023.  40h    WORD    number of polls remaining before next task switch
  1024.  42h    WORD    /KEYIDLE value
  1025.  44h    BYTE    flags for interrupts already grabbed by TAME
  1026.         bit 0: INT 10h
  1027.             1: INT 14h
  1028.             2: INT 15h
  1029.             3: INT 16h
  1030.             4: INT 17h
  1031.             5: INT 21h
  1032.             6: INT 28h
  1033.  45h    BYTE    flags for interrupts which may be acted on (same bits as above)
  1034.  46h    BYTE    TAME enabled (01h) or disabled (00h)
  1035.  47h    BYTE    /TIMEPOLL (01h) or /NOTIMEPOLL (00h)
  1036.  48h    BYTE    /NOTIMER (01h) or /TIMER (00h)
  1037.  49h    BYTE    window or task number for this task
  1038.  4Ah    BYTE    multitasker type ???
  1039.         01h DESQview
  1040.         02h DoubleDOS
  1041.         03h TopView
  1042.         ???
  1043.  4Bh    BYTE    type of task switching selected
  1044.         bit 0: DESQview???
  1045.             1: DoubleDOS???
  1046.             2: TopView???
  1047.             3: KeySwitch
  1048.             4: HLT instruction
  1049.  4Ch    BYTE    ???
  1050.  4Dh    BYTE    flags
  1051.         bit 1: /FREQ instead of /MAX
  1052.  4Eh    BYTE    /FG: value
  1053.  4Fh    BYTE    task switches left until next FGONLY DESQview API call
  1054.  50h    BYTE    ???
  1055.  
  1056. Format of TAME 2.30 data area:
  1057. Offset    Size    Description
  1058.  00h    BYTE    data structure minor version number (02h in TAME 2.30)
  1059.  01h    BYTE    data structure major version number (0Ah in TAME 2.30)
  1060.  02h    DWORD    number of task switches
  1061.  06h    DWORD    number of keyboard polls
  1062.  0Ah    DWORD    number of time polls
  1063.  0Eh    DWORD    number of times DESQview told program runs only in foreground
  1064.  12h    DWORD    time of last /CLEAR or TAME-RES load
  1065.  16h    DWORD    time yielded
  1066.  1Ah    DWORD    time spent polling
  1067.  1Eh    DWORD    time spent waiting on key input with INT 16/AH=01h,11h
  1068.  22h    DWORD    original INT 10h
  1069.  26h    DWORD    original INT 14h
  1070.  2Ah    DWORD    original INT 15h
  1071.  2Eh    DWORD    original INT 16h
  1072.  32h    DWORD    original INT 17h
  1073.  36h    DWORD    original INT 21h
  1074.  3Ah    DWORD    original INT 28h
  1075.  3Eh    WORD    offset of TAME INT 10h handler
  1076.  40h    WORD    offset of TAME INT 14h handler
  1077.  42h    WORD    offset of TAME INT 15h handler
  1078.  44h    WORD    offset of TAME INT 16h handler
  1079.  46h    WORD    offset of TAME INT 17h handler
  1080.  48h    WORD    offset of TAME INT 21h handler
  1081.  4Ah    WORD    offset of TAME INT 28h handler
  1082.  4Ch    WORD    X in /max:X,Y or /freq:X,Y
  1083.  4Eh    WORD    Y in /max:X,Y or /freq:X,Y
  1084.  50h    WORD    number of polls remaining before next task switch
  1085.  52h    WORD    /KEYIDLE value
  1086.  54h    WORD    /FG: value
  1087.  56h    WORD    task switches left until next FGONLY DESQview API call
  1088.  58h    WORD    multitasker version
  1089.  5Ah    WORD    virtual screen segment
  1090.  5Ch    BYTE    flags for interrupts already grabbed by TAME
  1091.         bit 0: INT 10h
  1092.             1: INT 14h
  1093.             2: INT 15h
  1094.             3: INT 16h
  1095.             4: INT 17h
  1096.             5: INT 21h
  1097.             6: INT 28h
  1098.  5Dh    BYTE    flags for interrupts which may be acted on (same bits as above)
  1099.  5Eh    BYTE    window or task number for this task
  1100.  5Fh    BYTE    multitasker type
  1101.         01h DESQview
  1102.         02h DoubleDOS
  1103.         03h TopView
  1104.         04h OmniView
  1105.         05h VM/386
  1106.  60h    BYTE    type of task switching selected (bit flags)
  1107.         bit 0: DESQview
  1108.             1: DoubleDOS
  1109.             2: TopView
  1110.             3: OmniView
  1111.             4: KeySwitch
  1112.             5: HLT instruction
  1113.  61h    BYTE    watch_DOS
  1114.  62h    BYTE    bit flags
  1115.         bit 0: TAME enabled
  1116.             1: /FREQ instead of /MAX (counts in 3Ch and 3Eh per tick)
  1117.             2: /TIMEPOLL
  1118.             3: /KEYPOLL
  1119.             4: inhibit timer
  1120.             5: enable status monitoring
  1121.  63h    BYTE    old status
  1122.  64h    WORD    signature DA34h
  1123. ---------------------------------------------
  1124. INT 21 - DOS - GET CURRENT TIME
  1125.     AH = 2Ch
  1126. Return: CH = hours
  1127.     CL = minutes
  1128.     DH = seconds
  1129.     DL = hundredths of seconds
  1130. Note:    time is updated approximately every 5/100 second
  1131. SeeAlso: AH=E7h,INT 1A/AH=00h,02h,FEh
  1132. ---------------------------------------------
  1133. INT 21 - DOS - SET CURRENT TIME
  1134.     AH = 2Dh
  1135.     CH = hours
  1136.     CL = minutes
  1137.     DH = seconds
  1138.     DL = hundredths of seconds
  1139. Return: AL = 00h if no error
  1140.        = FFh if bad value sent to routine
  1141. Note:    DOS 3.3+ also sets CMOS clock
  1142. SeeAlso: INT 1A/AH=01h,03h,FFh
  1143. ---------------------------------------------
  1144. INT 21 - DOS - SET VERIFY FLAG
  1145.     AH = 2Eh
  1146.     DL = 00h
  1147.     AL = 01h VERIFY on
  1148.          00h VERIFY off
  1149. Note:    when ON, all disk writes are verified
  1150. SeeAlso: AH=54h
  1151. ---------------------------------------------
  1152. INT 21 - DOS 2+ - GET DISK TRANSFER AREA ADDRESS
  1153.     AH = 2Fh
  1154. Return: ES:BX -> DTA
  1155. SeeAlso: AH=1Ah
  1156. ---------------------------------------------
  1157. INT 21 - DOS 2+ - GET DOS VERSION
  1158.     AH = 30h
  1159. Return: AL = major version number (00h for DOS 1.x)
  1160.     AH = minor version number
  1161.     BH = OEM number
  1162.         00h IBM
  1163.         16h DEC
  1164.         FFh Phoenix
  1165.     BL:CX = 24-bit user number
  1166. Notes:    the OS/2 Compatibility Box returns 0Ah for the major version
  1167.     DOS 4.01 identifies itself as version 4.00
  1168. ---------------------------------------------
  1169. INT 21 - Phar Lap 386/DOS-Extender - GET VERSION
  1170.     AH = 30h
  1171.     EBX = 50484152h ("PHAR")
  1172. Return: ???
  1173. ---------------------------------------------
  1174. INT 21 - CTask 2.0 - INSTALLATION CHECK
  1175.     AX = 3000h
  1176.     BX = 1234h
  1177.     DS:DX -> version string??? (8 bytes)
  1178. Return: AL = DOS major version
  1179.     AH = DOS minor version
  1180.     CX:BX -> ???
  1181. Notes:    if first eight bytes of returned data block equal eight bytes passed
  1182.       in, CTask is resident
  1183.     CTask is a multitasking kernel for C written by Thomas Wagner
  1184. ---------------------------------------------
  1185. INT 21 - DOS 2+ - TERMINATE BUT STAY RESIDENT
  1186.     AH = 31h
  1187.     AL = exit code
  1188.     DX = program size, in paragraphs
  1189. Note:    most TSRs can save some memory by releasing their environment block
  1190.       before terminating (see AH=26h)
  1191. SeeAlso: INT 22, INT 27
  1192. ---------------------------------------------
  1193. INT 21 - DOS 2+ internal - GET DRIVE PARAMETER BLOCK
  1194.     AH = 32h
  1195.     DL = drive number
  1196.         0 = default, 1 = A, etc.
  1197. Return: AL = FFh if invalid drive number, else
  1198.     DS:BX -> drive parameter block (see below)
  1199. Note:    the OS/2 compatibility box supports the DOS 3.3 version of this call
  1200.       except for the DWORD at offset 12h
  1201. SeeAlso: AH=1Fh
  1202.  
  1203. Format of DOS Drive Parameter Block:
  1204. Offset    Size    Description
  1205.  00h    BYTE    drive number (0 = A, etc.)
  1206.  01h    BYTE    unit number within device driver
  1207.  02h    WORD    number of bytes per sector
  1208.  04h    BYTE    largest sector number in cluster (one less than sect/clust)
  1209.  05h    BYTE    log base two of the cluster size
  1210.  06h    WORD    number of reserved (boot) sectors
  1211.  08h    BYTE    number of copies of the FAT
  1212.  09h    WORD    number of root directory entries
  1213.  0Bh    WORD    first data sector on medium
  1214.  0Dh    WORD    largest possible cluster number (one more than # data clust)
  1215. ---DOS 2.x---
  1216.  0Fh    BYTE    number of sectors in one FAT copy
  1217.  10h    WORD    first sector of root directory
  1218.  12h    DWORD    address of device driver for this drive
  1219.  16h    BYTE    media descriptor byte for medium
  1220.  17h    BYTE    FFh indicates block must be rebuilt
  1221.  18h    DWORD    address of next device block, offset = FFFFh indicates last
  1222.  1Ch    WORD    starting cluster of current directory (0 = root directory)
  1223.  1Eh 64 BYTEs    ASCIZ current directory path string
  1224. ---DOS 3.x---
  1225.  0Fh    BYTE    number of sectors in one FAT copy
  1226.  10h    WORD    first sector of root directory
  1227.  12h    DWORD    address of device driver for this drive
  1228.  16h    BYTE    media descriptor byte for medium
  1229.  17h    BYTE    FFh = block must be rebuilt, 00h indicates block accessed
  1230.  18h    DWORD    address of next device block, offset = FFFFh indicates last
  1231.  1Ch    WORD    cluster at which to start search for free space when writing
  1232.  1Eh    WORD    number of free clusters on drive, FFFFh = unknown
  1233. ---DOS 4.0---
  1234.  0Fh    WORD    number of sectors in one FAT copy
  1235.  11h    WORD    first sector of root directory
  1236.  13h    DWORD    address of device driver for this drive
  1237.  17h    BYTE    media descriptor byte for medium
  1238.  18h    BYTE    FFh = block must be rebuilt, 00h indicates block accessed
  1239.  19h    DWORD    address of next device block, offset = FFFFh indicates last
  1240.  1Dh    WORD    cluster at which to start search for free space when writing
  1241.  1Fh    WORD    number of free clusters on drive, FFFFh = unknown
  1242. ---------------------------------------------
  1243. INT 21 - DOS 2+ - EXTENDED CONTROL-BREAK CHECKING
  1244.     AH = 33h
  1245.     AL = subfunction
  1246.         00h get state
  1247.         Return: DL = current BREAK setting
  1248.                 00h BREAK=OFF
  1249.                 01h BREAK=ON
  1250.         01h set state
  1251.         DL = 00h for OFF or 01h for ON
  1252. Return:    AL = FFh if error
  1253. Note:    under DOS 3+, this function does not use any of the DOS-internal stacks
  1254.       and is thus fully reentrant
  1255. ---------------------------------------------
  1256. INT 21 - DOS 3.x internal - GET AND SET EXTENDED CONTROL-BREAK CHECKING STATE
  1257.     AX = 3302h
  1258.     DL = new state
  1259.          00h for OFF or 01h for ON
  1260. Return: DL = old state of extended BREAK checking
  1261. Note:    this function does not use any of the DOS-internal stacks and is thus
  1262.       fully reentrant
  1263. ---------------------------------------------
  1264. INT 21 - DOS 4.0 - GET BOOT DRIVE
  1265.     AX = 3305h
  1266. Return: DL = boot drive (1=A:,...)
  1267. ---------------------------------------------
  1268. INT 21 - DOS 2+ internal - RETURN CritSectFlag (InDOS) POINTER
  1269.     AH = 34h
  1270. Return: ES:BX -> 1-byte DOS "Critical Section Flag", also known as InDOS flag
  1271. Notes:    when the critical section flag is nonzero, code within DOS is being
  1272.       executed.  It is safe to enter DOS when both the critical section
  1273.       flag and the critical error flag are zero.
  1274.     The critical error flag is the byte after the critical section flag in
  1275.       DOS 2.x, and the byte BEFORE the critical section flag in DOS 3.x 
  1276.       (except COMPAQ DOS 3.0, where the critical error flag is located 1AAh
  1277.       bytes BEFORE the critical section flag)
  1278.     For DOS 3.1+, an undocumented call exists to get the address of the
  1279.       critical error flag (see AX=5D06h)
  1280. ---------------------------------------------
  1281. INT 21 - DOS 2+ - GET INTERRUPT VECTOR
  1282.     AH = 35h
  1283.     AL = interrupt number
  1284. Return: ES:BX = value of interrupt vector
  1285. SeeAlso: AH=25h
  1286. ---------------------------------------------
  1287. INT 21 - DOS 2+ - GET DISK SPACE
  1288.     AH = 36h
  1289.     DL = drive code (0 = default, 1 = A, 2 = B, etc.)
  1290. Return: AX = number of sectors per cluster
  1291.          or 0FFFFh if invalid drive
  1292.     BX = number of available clusters
  1293.     CX = bytes per sector
  1294.     DX = total clusters
  1295. Notes:    multiply AX * CX * BX for free space on disk
  1296.     multiply AX * CX * DX for total disk space
  1297.     according to Dave Williams' MSDOS reference, the value in DX is
  1298.       incorrect for non-default drives after ASSIGN is run
  1299. SeeAlso: AH=1Ch
  1300. ---------------------------------------------
  1301. INT 21 - DOS 2+ internal - GET SWITCHAR
  1302.     AX = 3700h
  1303. Return: AL = FFh unsupported subfunction
  1304.     DL = current switch character
  1305. Notes:    documented in some OEM versions of some releases of DOS
  1306.     supported by OS/2 compatibility box
  1307. SeeAlso: AX=3701h
  1308. ---------------------------------------------
  1309. INT 21 - DOS 2+ internal - SET SWITCHAR
  1310.     AX = 3701h
  1311.     DL = new switch character
  1312. Return: AL = FFh unsupported subfunction
  1313. Notes:    documented in some OEM versions of some releases of DOS
  1314.     supported by OS/2 compatibility box
  1315. SeeAlso: AX=3700h
  1316. ---------------------------------------------
  1317. INT 21 - DOS 2.x and 4.0 only internal - AVAILDEV
  1318.     AH = 37h
  1319.     AL = subfunction
  1320.        02h read device availability (as set by AL=03h)
  1321.         Return: DL = device availability (always FFh under DOS 4.0)
  1322.        03h set device availability, where:
  1323.         DL = 00h means \DEV\ must preceed device names
  1324.         DL <> 00h means \DEV\ need not preceed device names
  1325. Return: AL = FFh if invalid subfunction
  1326. Notes:    all versions of DOS from 2.00 allow \DEV\ to be prepended to device
  1327.       names without generating an error even if the directory \DEV does
  1328.       not actually exist (other paths generate an error if they do not
  1329.       exist).
  1330.     although DOS 4.0 accepts these calls, they have no effect
  1331. ---------------------------------------------
  1332. INT 21 - DOS 2+ - GET COUNTRY-DEPENDENT INFORMATION
  1333.     AH = 38h
  1334. --DOS 2.x--
  1335.     AL = 00h get current-country info
  1336.     DS:DX -> buffer for returned info (see below)
  1337. Return: AX = country code (MSDOS 2.11 only)
  1338.     buffer at DS:DX filled
  1339. --DOS 3+--
  1340.     AL = 00h for current country
  1341.     AL = 01h thru 0FEh for specific country with code <255
  1342.     AL = 0FFh for specific country with code >= 255
  1343.        BX = 16-bit country code
  1344.     DS:DX -> buffer for returned info (see below)
  1345. Return:    CF set on error
  1346.         AX = error code (02h)
  1347.     CF clear if successful
  1348.         BX = country code
  1349.         DS:DX buffer filled
  1350. SeeAlso: AH=65h, INT 2F/AX=110Ch,1404h
  1351.  
  1352. Format of PCDOS 2.x country info:
  1353. Offset    Size    Description
  1354.  00h    WORD    date format  0 = USA    mm dd yy
  1355.                  1 = Europe dd mm yy
  1356.                  2 = Japan    yy mm dd
  1357.  02h    BYTE    currency symbol
  1358.  03h    BYTE    00h
  1359.  04h    BYTE    thousands separator char
  1360.  05h    BYTE    00h
  1361.  06h    BYTE    decimal separator char
  1362.  07h    BYTE    00h
  1363.  08h 24 BYTEs    reserved
  1364.  
  1365. Format of MSDOS 2.x, DOS 3+ country info:
  1366. Offset    Size    Description
  1367.  00h    WORD    date format (see above)
  1368.  02h  5 BYTEs    ASCIZ currency symbol string
  1369.  07h    BYTE    thousands separator char
  1370.  08h    BYTE    00h
  1371.  09h    BYTE    decimal separator char
  1372.  0Ah    BYTE    00h
  1373.  0Bh    BYTE    date separator char
  1374.  0Ch    BYTE    00h
  1375.  0Dh    BYTE    time separator char
  1376.  0Eh    BYTE    00h
  1377.  0Fh    BYTE    currency format
  1378.         bit 2 = set if currency symbol replaces decimal point
  1379.         bit 1 = number of spaces between value and currency symbol
  1380.         bit 0 = 0 if currency symbol precedes value
  1381.             1 if currency symbol follows value
  1382.  10h    BYTE    number of digits after decimal in currency
  1383.  11h    BYTE    time format
  1384.         bit 0 = 0 if 12-hour clock
  1385.             1 if 24-hour clock
  1386.  12h    DWORD    address of case map routine
  1387.         (FAR CALL, AL = char to map to upper case [>= 80h])
  1388.  16h    BYTE    data-list separator char
  1389.  17h    BYTE    00h
  1390.  18h 10 BYTEs    reserved
  1391. ---------------------------------------------
  1392. INT 21 - DOS 3+ - SET COUNTRY CODE
  1393.     AH = 38h
  1394.     AL = 01h thru 0FEh for specific country with code <255
  1395.     AL = FFh for specific country with code >= 255
  1396.        BX = 16-bit country code
  1397.     DX = FFFFh
  1398. Return: CF set on error
  1399.         AX = error code (see AH=59h)
  1400.     CF clear if successful
  1401. SeeAlso: INT 2F/AX=1403h
  1402. ---------------------------------------------
  1403. INT 21 - DOS 2+ - CREATE A SUBDIRECTORY (MKDIR)
  1404.     AH = 39h
  1405.     DS:DX -> ASCIZ pathname (may include drive)
  1406. Return: CF set on error
  1407.         AX = error code (03h,05h) (see AH=59h)
  1408.     CF clear if successful
  1409. Note:    all directories in the given path except the last must exist
  1410. SeeAlso: AH=3Ah,3Bh, INT 2F/AX=1103h
  1411. ---------------------------------------------
  1412. INT 21 - DOS 2+ - REMOVE A DIRECTORY ENTRY (RMDIR)
  1413.     AH = 3Ah
  1414.     DS:DX -> ASCIZ pathname (may include drive)
  1415. Return: CF set on error
  1416.         AX = error code (03h,05h,06h,10h) (see AH=59h)
  1417.     CF clear if successful
  1418. SeeAlso: AH=39h,3Bh, INT 2F/AX=1101h
  1419. ---------------------------------------------
  1420. INT 21 - DOS 2+ - CHANGE THE CURRENT DIRECTORY (CHDIR)
  1421.     AH = 3Bh
  1422.     DS:DX -> ASCIZ directory name (may include drive)
  1423. Return: CF set on error
  1424.         AX = error code (03h) (see AH=59h)
  1425.     CF clear if successful
  1426. Note:    if new directory name includes a drive letter, the default drive is
  1427.       not changed, only the current directory on that drive
  1428. SeeAlso: AH=47h, INT 2F/AX=1105h
  1429. ---------------------------------------------
  1430. INT 21 - DOS 2+ - CREATE A FILE WITH HANDLE (CREAT)
  1431.     AH = 3Ch
  1432.     CX = attributes for file
  1433.         bit 0: read-only
  1434.         1: hidden
  1435.         2: system
  1436.         3: volume label (ignored)
  1437.         4: reserved, must be zero (directory)
  1438.         5: archive bit
  1439.         7: if set, file is shareable under Novell NetWare
  1440.     DS:DX -> ASCIZ filename (may include drive and path)
  1441. Return: CF set on error
  1442.         AX = error code (03h,04h,05h) (see AH=59h)
  1443.     CF clear if successful
  1444.         AX = file handle
  1445. Note:    if a file with the given name exists, it is truncated to zero length
  1446. SeeAlso: AH=3Dh
  1447. ---------------------------------------------
  1448. INT 21 - DOS 2+ - OPEN DISK FILE WITH HANDLE
  1449.     AH = 3Dh
  1450.     AL = access mode
  1451.         00h read only
  1452.         01h write only
  1453.         02h read/write
  1454.     AL bits 7-3 = file-sharing modes (DOS 3+)
  1455.         bit 7    = inheritance flag, set for no inheritance
  1456.         bits 4-6 = sharing mode
  1457.               000 compatibility mode
  1458.               001 exclusive (deny all)
  1459.               010 write access denied (deny write)
  1460.               011 read access denied (deny read)
  1461.               100 full access permitted (deny none)
  1462.               111 used internally by SHARE
  1463.         bit 3    = reserved, should be zero
  1464.     DS:DX -> ASCIZ filename
  1465. Return: CF set on error
  1466.         AX = error code (01h,02h,03h,04h,05h,0Ch) (see AH=59h)
  1467.     CF clear if successful
  1468.         AX = file handle
  1469. Notes:    file pointer is set to start of file
  1470.     file handles which are inherited from a parent also inherit sharing
  1471.       and access restrictions
  1472. SeeAlso: AH=0Fh,3Ch, INT 2F/AX=1226h
  1473.  
  1474. File sharing behavior:
  1475.       |    Second and subsequent Opens
  1476.  First      |Compat  Deny      Deny     Deny    Deny
  1477.  Open      |       All      Write     Read    None
  1478.       |R W RW R W RW R W RW R W RW R W RW
  1479.  - - - - -| - - - - - - - - - - - - - - - - -
  1480.  Compat    R |Y Y Y  N N N  1 N N    N N N  1 N N
  1481.     W |Y Y Y  N N N  N N N    N N N  N N N
  1482.     RW|Y Y Y  N N N  N N N    N N N  N N N
  1483.  - - - - -|
  1484.  Deny    R |C C C  N N N  N N N    N N N  N N N
  1485.  All    W |C C C  N N N  N N N    N N N  N N N
  1486.     RW|C C C  N N N  N N N    N N N  N N N
  1487.  - - - - -|
  1488.  Deny    R |2 C C  N N N  Y N N    N N N  Y N N 
  1489.  Write    W |C C C  N N N  N N N    N N N  N N N 
  1490.     RW|C C C  N N N  N N N    N N N  N N N
  1491.  - - - - -|
  1492.  Deny    R |C C C  N N N  N Y N    N N N  N Y N
  1493.  Read    W |C C C  N N N  N N N    N N N  N Y N
  1494.     RW|C C C  N N N  N N N    N N N  N Y N
  1495.  - - - - -|
  1496.  Deny    R |2 C C  N N N  Y Y Y    N N N  Y Y Y
  1497.  None    W |C C C  N N N  N N N    Y Y Y  Y Y Y
  1498.     RW|C C C  N N N  N N N    N N N  Y Y Y
  1499. Legend: Y = open succeeds, N = open fails with error code 05h
  1500.     C = open fails, INT 24 generated
  1501.     1 = open succeeds if file read-only, else fails with error code
  1502.     2 = open succeeds if file read-only, else fails with INT 24
  1503. ---------------------------------------------
  1504. INT 21 - DOS 2+ - CLOSE A FILE WITH HANDLE
  1505.     AH = 3Eh
  1506.     BX = file handle
  1507. Return: CF set on error
  1508.         AX = error code (06h) (see AH=59h)
  1509.     CF clear if successful
  1510. Note:    if the file was written to, the time and date stamps are set to the
  1511.       current time
  1512. SeeAlso: AH=10h,3Ch,3Dh, INT 2F/AX=1106h,1227h
  1513. ---------------------------------------------
  1514. INT 21 - DOS 2+ - READ FROM FILE WITH HANDLE
  1515.     AH = 3Fh
  1516.     BX = file handle
  1517.     CX = number of bytes to read
  1518.     DS:DX -> buffer
  1519. Return: CF set on error
  1520.         AX = error code (05h,06h) (see AH=59h)
  1521.     CF clear if successful
  1522.         AX = number of bytes read (0 if at EOF before call)
  1523. Notes:    the returned AX may be smaller than the request in CX if a partial
  1524.       read occurred
  1525.     if reading from CON, read stops at first CR
  1526. SeeAlso: AH=27h,40h, INT 2F/AX=1108h,1229h
  1527. ---------------------------------------------
  1528. INT 21 - DOS 2+ - WRITE TO FILE WITH HANDLE
  1529.     AH = 40h
  1530.     BX = file handle
  1531.     CX = number of bytes to write
  1532.     DS:DX -> buffer
  1533. Return: CF set on error
  1534.         AX = error code (05h,06h) (see AH=59h)
  1535.     CF clear if successful
  1536.         AX = number of bytes actually written
  1537. Notes:    if CX is zero, no data is written, and the file is truncated or
  1538.       extended to the current position
  1539.     the usual cause for AX < CX on return is a full disk
  1540. SeeAlso: AH=28h,3Fh, INT 2F/AX=1109h
  1541. ---------------------------------------------
  1542. INT 21 - DOS 2+ - DELETE A FILE (UNLINK)
  1543.     AH = 41h
  1544.     DS:DX -> ASCIZ pathname of file to delete (no wildcards allowed)
  1545. Return: CF set on error
  1546.         AX = error code (02h,05h) (see AH=59h)
  1547.     CF clear if successful
  1548. Note:    (DOS 3.1+) wildcards are allowed if invoked via AX=5D00h, in which case
  1549.       the filespec must be canonical (as returned by AH=60h)
  1550. SeeAlso: AH=13h,AX=5D00h,AH=60h, INT 2F/AX=1113h
  1551. ---------------------------------------------
  1552. INT 21 - DOS 2+ - MOVE FILE READ/WRITE POINTER (LSEEK)
  1553.     AH = 42h
  1554.     AL = method
  1555.         00h offset from beginning of file
  1556.         01h offset from present location
  1557.         02h offset from end of file
  1558.     BX = file handle
  1559.     CX:DX = offset in bytes
  1560. Return: CF set on error
  1561.         AX = error code (01h,06h) (see AH=59h)
  1562.     CF clear if successful
  1563.         DX:AX = new absolute offset from beginning of file
  1564. SeeAlso: AH=24h, INT 2F/AX=1228h
  1565. ---------------------------------------------
  1566. INT 21 - DOS 2+ - GET FILE ATTRIBUTES
  1567.     AX = 4300h
  1568.     DS:DX -> ASCIZ file name or directory name without trailing slash
  1569. Return: CF set on error
  1570.         AX = error code (01h,02h,03h,05h) (see AH=59h)
  1571.     CF clear if successful
  1572.         CX = file attributes (see AX=4301h)
  1573. SeeAlso: AX=4301h, INT 2F/AX=110Fh
  1574. ---------------------------------------------
  1575. INT 21 - DOS 2+ - PUT FILE ATTRIBUTES (CHMOD)
  1576.     AX = 4301h
  1577.     CX = file attribute bits
  1578.         bit 0 = read only
  1579.         1 = hidden file
  1580.         2 = system file
  1581.         3 = volume label
  1582.         4 = subdirectory
  1583.         5 = written since backup ("archive" bit)
  1584.         8 = shareable (Novell NetWare)
  1585.     DS:DX -> ASCIZ file name
  1586. Return: CF set on error
  1587.         AX = error code (01h,02h,03h,05h) (see AH=59h)
  1588.     CF clear if successful
  1589. Note:    will not change volume label or directory attributes
  1590. SeeAlso: AX=4300h, INT 2F/AX=110Eh
  1591. ---------------------------------------------
  1592. INT 21 - DOS 2+ - IOCTL - GET DEVICE INFORMATION
  1593.     AX = 4400h
  1594.     BX = file or device handle
  1595. Return: CF set on error
  1596.        AX = error code (see AH=59h)
  1597.     CF clear if successful
  1598.        DX = device info
  1599.        If bit 7 set: (character device)
  1600.            bit 0: console input device
  1601.            1: console output device
  1602.            2: NUL device
  1603.            3: CLOCK$ device
  1604.            4: device is special (uses INT 29)
  1605.            5: binary (raw) mode
  1606.            6: Not EOF
  1607.           12: network device (DOS 3+)
  1608.           14: can process IOCTL control strings (see AL = 02h-05h)
  1609.        If bit 7 clear: (file)
  1610.            bits 0-5 are block device number
  1611.            6: file has not been written
  1612.           12: network device (DOS 3+)
  1613.           14: can process IOCTL control strings (DOS 3+)
  1614.           15: file is remote (DOS 3+)
  1615. SeeAlso: AX=4401h, INT 2F/AX=122Bh
  1616. ---------------------------------------------
  1617. INT 21 - DOS 2+ - IOCTL - SET DEVICE INFORMATION
  1618.     AX = 4401h
  1619.     BX = device handle
  1620.     DH = 0
  1621.     DL = device information to set (bits 0-7 from function 0)
  1622. Return: CF set on error
  1623.         AX = error code (see AH=59h)
  1624.     CF clear if successful
  1625. SeeAlso: AX=4400h, INT 2F/AX=122Bh
  1626. ---------------------------------------------
  1627. INT 21 - DOS 2+ - IOCTL - READ CHARACTER DEVICE CONTROL STRING
  1628.     AX = 4402h
  1629.     BX = device handle
  1630.     CX = number of bytes to read
  1631.     DS:DX -> buffer
  1632. Return: CF set on error
  1633.         AX = error code (see AH=59h)
  1634.     CF clear if successful
  1635.         AX = number of bytes read
  1636. SeeAlso: AX=4403h,4404h, INT 2F/AX=122Bh
  1637. ---------------------------------------------
  1638. INT 21 - Network Driver Interface Spec 2.0.1 - PROTOCOL MANAGER
  1639.     AX = 4402h
  1640.     BX = file handle for device "PROTMAN$"
  1641.     DS:DX -> request block (see below)
  1642.     CX = 000Eh (size of request block)
  1643.  
  1644. Format of request block for GetProtocolManagerInfo:
  1645. Offset    Size    Description
  1646.  00h    WORD    01h
  1647.  02h    WORD    returned status (see below)
  1648.  04h    DWORD    returned pointer to structure representing parsed user config
  1649.  08h    DWORD    unused
  1650.  0Ch    WORD    returned BCD version of NDIS on which Protocol Manager is based
  1651.  
  1652. Format of request block for RegisterModule:
  1653. Offset    Size    Description
  1654.  00h    WORD    02h
  1655.  02h    WORD    returned status (see below)
  1656.  04h    DWORD    pointer to module's common characteristics table (see below)
  1657.  08h    DWORD    pointer to list of modules to which the module is to be bound
  1658.  0Ch    WORD    unused
  1659.  
  1660. Format of request block for BindAndStart:
  1661. Offset    Size    Description
  1662.  00h    WORD    03h
  1663.  02h    WORD    returned status (see below)
  1664.  04h    DWORD    caller's virtual address in FailingModules structure
  1665.  08h    DWORD    unused
  1666.  0Ch    WORD    unused
  1667.  
  1668. Format of request block for GetProtocolManagerLinkage:
  1669. Offset    Size    Description
  1670.  00h    WORD    04h
  1671.  02h    WORD    returned status (see below)
  1672.  04h    DWORD    returned dispatch point
  1673.  08h    DWORD    unused
  1674.  0Ch    WORD    returned protocol manager DS
  1675. Note:    the dispatch point may be called as follows instead of using this IOCTL
  1676.     STACK: WORD  protocol manager DS
  1677.            DWORD pointer to request block
  1678.     Return: AX = returned status
  1679.         STACK popped
  1680.  
  1681. Format of request block for GetProtocolIniPath:
  1682. Offset    Size    Description
  1683.  00h    WORD    05h
  1684.  02h    WORD    returned status (see below)
  1685.  04h    DWORD    pointer to a buffer for the ASCIZ pathname of PROTOCOL.INI
  1686.  08h    DWORD    unused
  1687.  0Ch    WORD    buffer length
  1688.  
  1689. Format of request block for RegisterProtocolManagerInfo:
  1690. Offset    Size    Description
  1691.  00h    WORD    06h
  1692.  02h    WORD    returned status (see below)
  1693.  04h    DWORD    pointer to structure containing parsed user config file
  1694.  08h    DWORD    unused
  1695.  0Ch    WORD    length of structure
  1696.  
  1697. Format of request block for InitAndRegister:
  1698. Offset    Size    Description
  1699.  00h    WORD    07h
  1700.  02h    WORD    returned status (see below)
  1701.  04h    DWORD    unused
  1702.  08h    DWORD    poitner to ASCIZ name of the module to be prebind initialized
  1703.  0Ch    WORD    unused
  1704.  
  1705. Format of request block for UnbindAndStop:
  1706. Offset    Size    Description
  1707.  00h    WORD    08h
  1708.  02h    WORD    returned status (see below)
  1709.  04h    DWORD    failing modules as for BindAndStart
  1710.  08h    DWORD    if not 0000h:0000h, pointer to ASCIZ name of module to unbind
  1711.         if 0000h:0000h, terminate a set of previously dynamically
  1712.           bound protocol modules
  1713.  0Ch    WORD    unused
  1714.  
  1715. Format of request block for BindStatus:
  1716. Offset    Size    Description
  1717.  00h    WORD    09h
  1718.  02h    WORD    returned status (see below)
  1719.  04h    DWORD    must be 0000h:0000h
  1720.         on return, points to root tree
  1721.  08h    DWORD    0000h:0000h
  1722.  0Ch    WORD    unused under DOS
  1723.  
  1724. Format of request block for RegisterStatus:
  1725. Offset    Size    Description
  1726.  00h    WORD    0Ah
  1727.  02h    WORD    returned status (0000h, 0008h, 002Ch) (see below)
  1728.  04h    DWORD    0000h:0000h
  1729.  08h    DWORD    pointer to 16-byte ASCIZ module name
  1730.  0Ch    WORD    0000h
  1731.  
  1732. Values of status code:
  1733.  0000h success
  1734.  0001h wait for release--protocol has retained control of the data buffer
  1735.  0002h request queued
  1736.  0003h frame not recognized
  1737.  0004h frame rejected
  1738.  0005h frame should be forwarded
  1739.  0006h out of resource
  1740.  0007h invalid parameter
  1741.  0008h invalid function
  1742.  0009h not supported
  1743.  000Ah hardware error
  1744.  000Bh transmit error
  1745.  000Ch unrecognized destination
  1746.  000Dh buffer too small
  1747.  0020h already started
  1748.  0021h binding incomplete
  1749.  0022h driver not initialized
  1750.  0023h hardware not found
  1751.  0024h hardware failure
  1752.  0025h configuration failure
  1753.  0026h interrupt conflict
  1754.  0027h MAC incompatible
  1755.  0028h initialization failed
  1756.  0029h no binding
  1757.  002Ah network may be disconnected
  1758.  002Bh incompatible OS version
  1759.  002Ch already registered
  1760.  002Dh path not found
  1761.  002Eh insufficient memory
  1762.  002Fh info not found
  1763.  00FFh general failure
  1764.  F000h-FFFFh reserved for vendor-specific codes, treated as general failure
  1765.  
  1766. Format of common characteristics table:
  1767. Offset    Size    Description
  1768.  00h    WORD    size of table in bytes
  1769.  02h    BYTE    NDIS major version
  1770.  03h    BYTE    NDIS minor version
  1771.  04h    WORD    reserved
  1772.  06h    BYTE    module major version
  1773.  07h    BYTE    module minor version
  1774.  08h    DWORD    module function flag bits
  1775.         bit 0: binding at upper boundary supported
  1776.         bit 1: binding at lower boundary supported
  1777.         bit 2: dynamically bound
  1778.         bits 3-31 reserved, must be 0
  1779.  0Ch 16 BYTEs    ASCIZ module name
  1780.  1Ch    BYTE    upper boundary protocol level
  1781.         01h Media Access Control
  1782.         02h Data link
  1783.         03h network
  1784.         04h transport
  1785.         05h session
  1786.         FFh not specified
  1787.  1Dh    BYTE    upper boundary interface type
  1788.         for MACs: 1 = MAC
  1789.         for data links and transports: to be defined
  1790.         for session: 1 = NCB
  1791.         any level: 0 = private (ISV-defined)
  1792.  1Eh    BYTE    lower boundary protocol level
  1793.         00h physical
  1794.         01h Media Access Control
  1795.         02h Data link
  1796.         03h network
  1797.         04h transport
  1798.         05h session
  1799.         FFh not specified
  1800.  1Fh    BYTE    lower boundary interface type
  1801.         same as offset 1Dh
  1802.  20h    WORD    module ID filled in by protocol manager
  1803.  22h    WORD    module DS
  1804.  24h    DWORD    system request entry point
  1805.  28h    DWORD    pointer to service-specific characteristics
  1806.         0000h:0000h if none
  1807.  2Ch    DWORD    pointer to service-specific status
  1808.         0000h:0000h if none
  1809.  30h    DWORD    pointer to upper dispatch table (see below)
  1810.         0000h:0000h if none
  1811.  34h    DWORD    pointer to lower dispatch table (see below)
  1812.         0000h:0000h if none
  1813.  38h    DWORD    reserved, must be 0
  1814.  3Ch    DWORD    reserved, must be 0
  1815. Note:    for compatibility with NDIS 1.x.x, a major version of 00h is
  1816.       interpreted as 01h
  1817.  
  1818. Format of MAC Service-Specific Characteristics Table:
  1819. Offset    Size    Description
  1820.  00h    WORD    length of table in bytes
  1821.  02h 16 BYTEs    ASCIZ MAC type name, "802.3", "802.4", "802.5", "802.6", "DIX",
  1822.         "DIX+802.3", "APPLETALK", "ARCNET", "FDDI", "SDLC", "BSC",
  1823.         "HDLC", or "ISDN"
  1824.  12h    WORD    length of station addresses in bytes
  1825.  14h 16 BYTEs    permanent station address
  1826.  24h 16 BYTEs    current station address
  1827.  34h    DWORD    current functional adapter address (00000000h if none)
  1828.  38h    DWORD    pointer to multicast address list
  1829.  3Ch    DWORD    link speed in bits/sec
  1830.  40h    DWORD    service flags
  1831.         bit 0: supports broadcast
  1832.             1: supports multicast
  1833.             2: supports functional/group addressing
  1834.             3: supports promiscuous mode
  1835.             4: station address software settable
  1836.             5: statistics always current
  1837.             6: supports InitiateDiagnostics
  1838.             7: supports loopback
  1839.             8: MAC does primarily ReceiveChain indications instead of
  1840.                ReceiveLookahead indications
  1841.             9: supports IBM source routing
  1842.            10: supports MAC reset
  1843.            11: supports Open/Close adapter
  1844.            12: supports interrupt request
  1845.            13: supports source routing bridge
  1846.            14: supports GDT virtual addresses (OS/2 version)
  1847.            15: multiple TransferDatas allowed durign a single
  1848.                indication
  1849.            16: MAC normally sets FrameSize = 0 in ReceiveLookahead
  1850.            17-31: reserved, must be 0
  1851.  44h    WORD    maximum frame size which may be both sent and received
  1852.  46h    DWORD    total transmit buffer capacity in bytes
  1853.  4Ah    WORD    transmit buffer allocation block size in bytes
  1854.  4Ch    DWORD    total receive buffer capacity in bytes
  1855.  50h    WORD    receive buffer allocation block size in bytes
  1856.  52h  3 BYTEs    IEEE vendor code
  1857.  55h    BYTE    vendor adapter code
  1858.  56h    DWORD    pointer to ASCIZ vendor adapter description
  1859.  5Ah    WORD    IRQ used by adapter
  1860.  5Ch    WORD    transmit queue depth
  1861.  5Eh    WORD    maximum supported number of data blocks in buffer descriptors
  1862.  60h  N BYTEs    vendor-specific info
  1863.  
  1864. Format of NetBIOS Service-Specific Characteristics Table
  1865. Offset    Size    Description
  1866.  00h    WORD    length of table in bytes
  1867.  02h 16 BYTEs    ASCIZ type name of NetBIOS module
  1868.  12h    WORD    NetBIOS module code
  1869.  14h  N BYTEs    vendor-specific info
  1870.  
  1871. Format of MAC Service-Specific Status Table:
  1872. Offset    Size    Description
  1873.  00h    WORD    length of table in bytes
  1874.  02h    DWORD    seconds since 0:00 1/1/70 when diagnostics last run
  1875.         (FFFFFFFFh = never)
  1876.  06h    DWORD    MAC status bits
  1877.         bits 0-2: 000 hardware not installed
  1878.               001 hardware failed startup diagnostics
  1879.               010 hardware configuration problem
  1880.               011 hardware fault
  1881.               100 operating marginally due to soft faults
  1882.               101 reserved
  1883.               110 reserved
  1884.               111 hardware fully operational
  1885.         bit 3:      MAC bound
  1886.             4:      MAC open
  1887.             5:      diagnostics in progress
  1888.             6-31: reserved
  1889.  0Ah    WORD    current packet filter flags
  1890.         bit 0: directed/multicast or group/functional
  1891.             1: broadcast
  1892.             2: promiscuous
  1893.             3: all source routing
  1894.             4-15: reserved, must be zero
  1895.  0Ch    DWORD    pointer to media-specific status table or 0000h:0000h
  1896.  10h    DWORD    seconds past 0:00 1/1/70 of last ClearStatistics
  1897.  14h    DWORD    total frames received (FFFFFFFFh = not counted)
  1898.  18h    DWORD    frames with CRC error (FFFFFFFFh = not counted)
  1899.  1Ch    DWORD    total bytes received (FFFFFFFFh = not counted)
  1900.  20h    DWORD    frames discarded--no buffer space (FFFFFFFFh = not counted)
  1901.  24h    DWORD    multicast frames received (FFFFFFFFh = not counted)
  1902.  28h    DWORD    broadcast frames received (FFFFFFFFh = not counted)
  1903.  2Ch    DWORD    frames with errors (FFFFFFFFh = not counted)
  1904.  30h    DWORD    overly large frames (FFFFFFFFh = not counted)
  1905.  34h    DWORD    frames less than minimum size (FFFFFFFFh = not counted)
  1906.  38h    DWORD    multicast bytes received (FFFFFFFFh = not counted)
  1907.  3Ch    DWORD    broadcast bytes received (FFFFFFFFh = not counted)
  1908.  40h    DWORD    frames discarded--hardware error (FFFFFFFFh = not counted)
  1909.  44h    DWORD    total frames transmitted (FFFFFFFFh = not counted)
  1910.  48h    DWORD    total bytes transmitted (FFFFFFFFh = not counted)
  1911.  4Ch    DWORD    multicast frames transmitted (FFFFFFFFh = not counted)
  1912.  50h    DWORD    broadcast frames transmitted (FFFFFFFFh = not counted)
  1913.  54h    DWORD    broadcast bytes transmitted (FFFFFFFFh = not counted)
  1914.  58h    DWORD    multicast bytes transmitted (FFFFFFFFh = not counted)
  1915.  5Ch    DWORD    frames not transmitted--timeout (FFFFFFFFh = not counted)
  1916.  60h    DWORD    frames not transmitted--hardware error (FFFFFFFFh = not countd)
  1917.  64h  N BYTEs    vendor-specific info
  1918. ---------------------------------------------
  1919. INT 21 - DOS 2+ - IOCTL - WRITE CHARACTER DEVICE CONTROL STRING
  1920.     AX = 4403h
  1921.     BX = device handle
  1922.     CX = number of bytes to write
  1923.     DS:DX -> buffer
  1924. Return: CF set on error
  1925.         AX = error code (see AH=59h)
  1926.     CF clear if successful
  1927.         AX = number of bytes written
  1928. SeeAlso: AX=4402h,4405h, INT 2F/AX=122Bh
  1929. ---------------------------------------------
  1930. INT 21 - DOS 2+ - IOCTL - READ BLOCK DEVICE CONTROL STRING
  1931.     AX = 4404h
  1932.     BL = drive number (0=default)
  1933.     CX = number of bytes to read
  1934.     DS:DX -> buffer
  1935. Return: CF set on error
  1936.         AX = error code (see AH=59h)
  1937.     CF clear if successful
  1938.         AX = number of bytes read
  1939. SeeAlso: AX=4402h,4405h, INT 2F/AX=122Bh
  1940. ---------------------------------------------
  1941. INT 21 - DOS 2+ - IOCTL - WRITE BLOCK DEVICE CONTROL STRING
  1942.     AX = 4405h
  1943.     BL = drive number (0=default)
  1944.     CX = number of bytes to write
  1945.     DS:DX -> buffer
  1946. Return: CF set on error
  1947.         AX = error code (see AH=59h)
  1948.     CF clear if successful
  1949.         AX = number of bytes written
  1950. SeeAlso: AX=4403h,4404h, INT 2F/AX=122Bh
  1951. ---------------------------------------------
  1952. INT 21 - DOS 2+ - IOCTL - GET INPUT STATUS
  1953.     AX = 4406h
  1954.     BX = file or device handle
  1955. Return: AL = FFh device ready
  1956.          00h device not ready (or file at EOF)
  1957. SeeAlso: AX=4407h, INT 2F/AX=122Bh
  1958. ---------------------------------------------
  1959. INT 21 - DOS 2+ - IOCTL - GET OUTPUT STATUS
  1960.     AX = 4407h
  1961.     BX = file or device handle
  1962. Return: AL = FFh device ready
  1963.          00h device not ready
  1964. Note:    for DOS 2.x, files are always ready for output
  1965. SeeAlso: AX=4406h, INT 2F/AX=122Bh
  1966. ---------------------------------------------
  1967. INT 21 - DOS 3+ - IOCTL - BLOCK DEVICE CHANGEABLE
  1968.     AX = 4408h
  1969.     BL = drive number (0=default)
  1970. Return:    CF set on error
  1971.         AX = error code (0Fh invalid drive) (see AH=59h)
  1972.     CF clear if successful
  1973.         AX = 00h removable
  1974.          01h fixed
  1975. SeeAlso: AX=4400h,4409h, INT 2F/AX=122Bh
  1976. ---------------------------------------------
  1977. INT 21 - DOS 3+ - IOCTL - BLOCK DEVICE LOCAL
  1978.     AX = 4409h
  1979.     BL = drive number (0=default)
  1980. Return: DX = attribute word, bit 12 set if device is remote
  1981. SeeAlso: AX=4400h,4408h,440Ah, INT 2F/AX=122Bh
  1982. ---------------------------------------------
  1983. INT 21 - DOS 3+ - IOCTL - HANDLE LOCAL
  1984.     AX = 440Ah
  1985.     BX = file handle
  1986. Return: DX = attribute word, bit 15 set if file is remote
  1987. Note:    if file is remote, Novell Advanced NetWare 2.0 returns the number of
  1988.       the file server on which the handle is located in CX
  1989. SeeAlso: AX=4400h,4409h, INT 2F/AX=122Bh
  1990. ---------------------------------------------
  1991. INT 21 - DOS 3+ - IOCTL - SET SHARING RETRY COUNT
  1992.     AX = 440Bh
  1993.     CX = delay (default 1)
  1994.     DX = retry count (default 3)
  1995. Return: CF set on error
  1996.         AX = error code (see AH=59h)
  1997.     CF clear if successful
  1998. Note:    delay is dependent on processor speed (value in CX specifies number of
  1999.       64K-iteration empty loops to execute)
  2000. SeeAlso: AH=52h, INT 2F/AX=1224h,122Bh
  2001. ---------------------------------------------
  2002. INT 21 - DOS 3.2+ - IOCTL - GENERIC CHARACTER DEVICE REQUEST
  2003.     AX = 440Ch
  2004.     BX = device handle
  2005.     CH = category code
  2006.         00h unknown (DOS 3.3+)
  2007.         01h COMn: (DOS 3.3+)
  2008.         03h CON (DOS 3.3+)
  2009.         05h LPTn:
  2010.     CL = function
  2011.         45h set iteration count
  2012.         4Ah select code page
  2013.         4Ch start code-page preparation
  2014.         4Dh end code-page preparation
  2015.         5Fh set display information (DOS 4.0)
  2016.         65h get iteration count
  2017.         6Ah query selected code page
  2018.         6Bh query prepare list
  2019.         7Fh get display information (DOS 4.0)
  2020.     DS:DX -> (DOS) parameter block (see below)
  2021.     SI:DI -> (OS/2 comp box) parameter block (see below)
  2022. Return: CF set on error
  2023.         AX = error code (see AH=59h)
  2024.     DS:DX -> (OS/2 comp box) data block
  2025. SeeAlso: AX=440Dh, INT 2F/AX=122Bh,1A01h
  2026.  
  2027. Format of parameter block for function 45h:
  2028. Offset    Size    Description
  2029.  00h    WORD    number of times output is attempted before driver assumes
  2030.         device is busy
  2031.  
  2032. Format of parameter block for functions 4Ah and 6Ah:
  2033. Offset    Size    Description
  2034.  00h    WORD    length of data
  2035.  02h    WORD    code page ID
  2036.  04h 2N BYTEs    DCBS (double byte character set) lead byte range
  2037.           start/end for each of N ranges (DOS 4.0)
  2038.     WORD    0000h  end of data (DOS 4.0)
  2039.  
  2040. Format of parameter block for function 4Dh:
  2041. Offset    Size    Description
  2042.  00h    WORD    length of data
  2043.  02h    WORD    code page ID
  2044.  
  2045. Format of parameter block for function 4Ch:
  2046. Offset    Size    Description
  2047.  00h    WORD    flags
  2048.         DISPLAY.SYS = 0000h
  2049.         PRINTER.SYS bit 0 clear to prepare downloaded font, set to
  2050.             prepare cartridge selection
  2051.  02h    WORD    length of remainder of parameter block
  2052.  04h    WORD    number of code pages following
  2053.  06h  N WORDs    code page 1,...,N
  2054.  
  2055. Format of parameter block for functions 5Fh and 7Fh:
  2056. Offset    Size    Description
  2057.  00h    BYTE    level (0 for DOS 4.0)
  2058.  01h    BYTE    reserved (0)
  2059.  02h    WORD    length of following data (14)
  2060.  04h    WORD    control flags
  2061.           bit 0 set for blink, clear for intensity
  2062.           bits 1 to 15 reserved
  2063.  06h    BYTE    mode type (1=text, 2=graphics)
  2064.  07h    BYTE    reserved (0)
  2065.  08h    WORD    colors
  2066.            0 = monochrome
  2067.            else N bits per pixel
  2068.  0Ah    WORD    pixel columns
  2069.  0Ch    WORD    pixel rows
  2070.  0Eh    WORD    character columns
  2071.  10h    WORD    character rows
  2072.  
  2073. Format of parameter block for function 6Bh:
  2074. Offset    Size    Description
  2075.  00h    WORD    length of following data
  2076.  02h    WORD    number of hardware code pages
  2077.  04h  N WORDs    hardware code pages 1,...,N
  2078.     WORD    number of prepared code pages
  2079.       N WORDs    prepared code pages 1,...,N
  2080. ---------------------------------------------
  2081. INT 21 - DOS 3.2+ - IOCTL - GENERIC BLOCK DEVICE REQUEST
  2082.     AX = 440Dh
  2083.     BL = drive number (0=default)
  2084.     CH = category code
  2085.         08h disk drive
  2086.     CL = function
  2087.          40h set device parameters
  2088.         41h write logical device track
  2089.         42h format and verify logical device track
  2090.         46h (DOS 4.0) set ???
  2091.         47h (DOS 4.0) set access flag
  2092.         60h get device parameters
  2093.         61h read logical device track
  2094.         62h verify logical device track
  2095.         67h (DOS 4.0) get access flag
  2096.     DS:DX -> (DOS) parameter block (see below)
  2097.     SI:DI -> (OS/2 comp box) parameter block (see below)
  2098. Return: CF set on error
  2099.        AX = error code (see AH=59h)
  2100.     DS:DX -> (OS/2 comp box) data block
  2101. Note:    DOS 4.01 seems to ignore the high byte of the number of directory
  2102.       entries in the BPB for diskettes.
  2103. SeeAlso: AX=440Ch, INT 2F/AX=122Bh
  2104.  
  2105. Format of parameter block for functions 40h, 60h:
  2106. Offset    Size    Description
  2107.  00h    BYTE    special functions
  2108.         bit 0 set if function to use current BPB, clear if Device BIOS
  2109.             Parameter Block field contains new default BPB
  2110.         bit 1 set if function to use track layout fields only
  2111.             must be clear if CL=60h
  2112.         bit 2 set if all sectors in track same size (should be set)
  2113.         bits 3-7 reserved
  2114.  01h    BYTE    device type
  2115.         00h  320K/360K disk
  2116.         01h  1.2M disk
  2117.         02h  720K disk
  2118.         03h  single-density 8-inch disk
  2119.         04h  double-density 8-inch disk
  2120.         05h  fixed disk
  2121.         06h  tape drive
  2122.         07h  1.44M disk
  2123.         08h  other type of block device
  2124.  02h    WORD    device attributes
  2125.         bit 0 set if nonremovable medium
  2126.         bit 1 set if door lock supported
  2127.         bits 2-15 reserved
  2128.  04h    WORD    number of cylinders
  2129.  06h    BYTE    media type
  2130.         00h 1.2M disk (default)
  2131.         01h 320K/360K disk
  2132.  07h 31 BYTEs    device BPB (see AH=53h)
  2133.  26h    WORD    number of sectors per track (start of track layout field)
  2134.  28h  N word pairs: number,size of each sector in track
  2135.  
  2136. Format of parameter block for functions 41h, 61h:
  2137. Offset    Size    Description
  2138.  00h    BYTE    reserved, must be zero
  2139.  01h    WORD    number of disk head
  2140.  03h    WORD    number of disk cylinder
  2141.  05h    WORD    number of first sector to read/write
  2142.  07h    WORD    number of sectors
  2143.  09h    DWORD    transfer address
  2144.  
  2145. Format of parameter block for functions 42h, 62h:
  2146. Offset    Size    Description
  2147.  00h    BYTE    reserved, must be zero (DOS <3.2)
  2148.           bit 0=0: format/verify track
  2149.             1: format status call (DOS 3.2+)
  2150.           bits 1-7 reserved, must be zero
  2151.         on return (DOS 4.0):
  2152.           bit 0: set if specified tracks, sectors/track supported
  2153.           bit 1: set if function not supported by BIOS
  2154.           bit 2: set if specified tracks, sectors/track not supported
  2155.           bit 3: set if no disk in drive
  2156.  01h    WORD    number of disk head
  2157.  03h    WORD    number of disk cylinder
  2158.  
  2159. Format of parameter block for functions 47h, 67h:
  2160. Offset    Size    Description
  2161.  00h    BYTE    special-function field (must be zero)
  2162.  01h    BYTE    disk-access flag, nonzero if access allowed by driver
  2163. ---------------------------------------------
  2164. INT 21 - DOS 3.2+ - IOCTL - GET LOGICAL DRIVE MAP
  2165.     AX = 440Eh
  2166.     BL = drive number (0=default)
  2167. Return: CF set on error
  2168.         AX = error code (see AH=59h)
  2169.     CF clear if successful
  2170.         AL = 00h block device has only one logical drive assigned
  2171.          1..26 the last letter used to reference the drive (1=A:,etc)
  2172. SeeAlso: AX=440Fh, INT 2F/AX=122Bh
  2173. ---------------------------------------------
  2174. INT 21 - DOS 3.2+ - IOCTL - SET LOGICAL DRIVE MAP
  2175.     AX = 440Fh
  2176.     BL = physical drive number (0=default)
  2177. Return: CF set on error
  2178.         AX = error code (see AH=59h)
  2179.     CF clear if successful
  2180. Note:    maps logical drives to physical drives, similar to DOS's treatment of
  2181.       a single physical floppy drive as both A: and B:
  2182. SeeAlso: AX=440Eh, INT 2F/AX=122Bh
  2183. ---------------------------------------------
  2184. INT 21 - DOS 2+ - CREATE DUPLICATE HANDLE (DUP)
  2185.     AH = 45h
  2186.     BX = file handle to duplicate
  2187. Return: CF set on error
  2188.         AX = error code (04h,06h) (see AH=59h)
  2189.     CF clear if successful
  2190.         AX = new file handle
  2191. Note:    moving file pointer for either handle will also move it for the other
  2192. SeeAlso: AH=46h
  2193. ---------------------------------------------
  2194. INT 21 - DOS 2+ - FORCE DUPLICATE HANDLE (FORCDUP,DUP2)
  2195.     AH = 46h
  2196.     BX = existing file handle
  2197.     CX = new file handle
  2198. Return: CF set on error
  2199.         AX = error code (04h,06h) (see AH=59h)
  2200.     CF clear if successful
  2201. Notes:    closes file with handle BX if it is still open
  2202.     moving file pointer for either handle will also move it for the other
  2203. SeeAlso: AH=45h
  2204. ---------------------------------------------
  2205. INT 21 - DOS 2+ - GET CURRENT DIRECTORY
  2206.     AH = 47h
  2207.     DL = drive (0=default, 1=A, etc.)
  2208.     DS:SI points to 64-byte buffer area
  2209. Return: CF set on error
  2210.         AX = error code (0Fh) (see AH=59h)
  2211.     CF clear if successful
  2212. Note:    the returned path does not include a drive or the initial backslash
  2213. SeeAlso: AH=3Bh
  2214. ---------------------------------------------
  2215. INT 21 - DOS 2+ - ALLOCATE MEMORY
  2216.     AH = 48h
  2217.     BX = number of 16-byte paragraphs desired
  2218. Return: CF set on error
  2219.         AX = error code (07h,08h) (see AH=59h)
  2220.         BX = size of largest available block
  2221.     CF clear if successful
  2222.         AX = segment of allocated memory block
  2223. SeeAlso: AH=49h,4Ah,58h
  2224. ---------------------------------------------
  2225. INT 21 - DOS 2+ - FREE MEMORY
  2226.     AH = 49h
  2227.     ES = segment address of area to be freed
  2228. Return: CF set on error
  2229.         AX = error code (07h,09h) (see AH=59h)
  2230.     CF clear if successful
  2231. SeeAlso: AH=48h,4Ah
  2232. ---------------------------------------------
  2233. INT 21 - DOS 2+ - ADJUST MEMORY BLOCK SIZE (SETBLOCK)
  2234.     AH = 4Ah
  2235.     ES = segment address of block to change
  2236.     BX = new size in paragraphs
  2237. Return: CF set on error
  2238.         AX = error code (07h,08h,09h) (see AH=59h)
  2239.         BX = maximum size possible for the block (if AX=08h)
  2240.     CF clear if successful
  2241. Notes:    under PCDOS 2.1 and 3.1 and MSDOS 3.2 and 3.3, if there is insufficient
  2242.       memory to expand the block as much as requested, the block will be
  2243.       made as large as possible
  2244. SeeAlso: AH=48h,49h
  2245. ---------------------------------------------
  2246. INT 21 - DOS 2+ - LOAD OR EXECUTE (EXEC)
  2247.     AH = 4Bh
  2248.     AL = subfunction
  2249.         00h load and execute program
  2250.         01h load but do not execute (internal)
  2251.         03h load overlay; do not create PSP
  2252.         04h called by MSC spawn(P_NOWAIT,...) when running DOS 4.x.
  2253.         returns unsuccessfully under DOS 4.0 (but may be successful
  2254.           in the original European OEM MSDOS 4.0, which has limited
  2255.           multitasking built in)
  2256.     DS:DX -> ASCIZ filename
  2257.     ES:BX -> parameter block (see below)
  2258. Return: CF set on error
  2259.         AX = error code (01h,02h,05h,08h,0Ah,0Bh) (see AH=59h)
  2260.     CF clear if successful
  2261.         if subfunction 01h, process ID set to new program's PSP; get with
  2262.         INT 21/AH=62h
  2263. Notes:    DOS 2.x destroys all registers, including SS:SP
  2264.     for functions 00h and 01h, the calling process must ensure that there
  2265.       is enough unallocated memory available; if necessary, by releasing
  2266.       memory with AH=49h or AH=4Ah
  2267. SeeAlso: AH=4Ch,4Dh,INT 2E
  2268.  
  2269. Format of EXEC parameter block for AL=00h,01h:
  2270. Offset    Size    Description
  2271.  00h    WORD    segment of environment (0 = use current) (see AH=26h)
  2272.  02h    DWORD    pointer to command line
  2273.  06h    DWORD    pointer to first FCB (see AH=0Fh)
  2274.  0Ah    DWORD    pointer to second FCB (see AH=0Fh)
  2275.  0Eh    DWORD    (AL=01h) will hold subprogram's initial SS:SP on return
  2276.  12h    DWORD    (AL=01h) will hold entry point (CS:IP) on return
  2277.  
  2278. Format of EXEC parameter block for AL=03h:
  2279. Offset    Size    Description
  2280.  00h    WORD    segment load address
  2281.  02h    WORD    segment relocation factor
  2282.  
  2283. Format of .EXE file header:
  2284. Offset    Size  Description
  2285.  00h    WORD  4Dh, 5Ah signature (sometimes 5Ah, 4Dh)
  2286.  02h    WORD  image size remainder (program size mod 512, not including header)
  2287.  04h    WORD  number of 512-byte pages needed to hold .EXE file (incl header)
  2288.  06h    WORD  number of relocation items
  2289.  08h    WORD  header size in paragraphs
  2290.  0Ah    WORD  minimum extra paragraphs needed
  2291.  0Ch    WORD  maximum extra paragraphs needed
  2292.  0Eh    WORD  stack segment
  2293.  10h    WORD  stack offset
  2294.  12h    WORD  word checksum of entire file
  2295.  14h    DWORD initial CS:IP
  2296.  18h    WORD  offset of relocation table 
  2297.  1Ah    WORD  overlay number
  2298. Note:    if word at offset 02h is 4, it should be treated as 00h, since pre-1.10
  2299.       versions of the MS linker set it that way
  2300. ---------------------------------------------
  2301. INT 21 - DOS 2+ - QUIT WITH EXIT CODE (EXIT)
  2302.     AH = 4Ch
  2303.     AL = exit code
  2304. Return: never returns
  2305. Note:    unless the process is its own parent (see AH=26h, offset 16h in PSP),
  2306.       all open files are closed
  2307. SeeAlso: AH=26h,4Bh,4Dh, INT 22
  2308. ---------------------------------------------
  2309. INT 21 - DOS 2+ - GET EXIT CODE OF SUBPROGRAM (WAIT)
  2310.     AH = 4Dh
  2311. Return: AL = exit code of subprogram (from AH=31h or AH=4Ch)
  2312.     AH = circumstance which caused termination
  2313.         00h Terminate/abort
  2314.         01h Control-C/Control-Break
  2315.         02h Hard error
  2316.         03h Terminate and stay resident
  2317. SeeAlso: AH=4Bh,4Ch
  2318. ---------------------------------------------
  2319. INT 21 - WILDUNIX.COM internal - INSTALLATION CHECK
  2320.     AH = 4Eh
  2321.     DS:DX = 0000h:0000h
  2322. Return:    AH = 99h if installed
  2323. Note:    WILDUNIX.COM is a resident Unix-style wildcard expander by Steve
  2324.       Hosgood and Terry Barnaby
  2325. ---------------------------------------------
  2326. INT 21 - DOS 2+ - FIND FIRST ASCIZ (FINDFIRST)
  2327.     AH = 4Eh
  2328.     CX = search attributes (see AX=4301h)
  2329.     DS:DX -> ASCIZ filespec (drive, path, and wildcards allowed)
  2330. Return: CF set on error
  2331.         AX = error code (02h,12h) (see AH=59h)
  2332.     CF clear if successful
  2333.         [DTA] = data block (see below)
  2334. Notes:    for search attributes other than 08h, all files with at MOST the
  2335.       specified attribute bits, the archive (20h) bit, and the read-only
  2336.       (01h) bits set will be returned.  Under DOS 2.x, searching for
  2337.       attribute 08h (volume label) will also return normal files, while
  2338.       under DOS 3+ only the volume label (if any) will be returned.
  2339.     this call also returns successfully if given the name of a character
  2340.       device without wildcards.  DOS 2.x returns attribute 00h, size 0,
  2341.       and the current date and time.  DOS 3+ returns attribute 40h and the
  2342.       current date and time.
  2343. BUG:    under DOS 3.x and 4.x, the second and subsequent calls to this function
  2344.       with a character device name (no wildcards) and search attributes
  2345.       which include the volume-label bit (08h) will fail unless there is
  2346.       an intervening DOS call which implicitly or explicity performs a
  2347.       directory search without the volume-label bit.  Such implicit
  2348.       searches are performed by CREATE (AH=3Ch), OPEN (AH=3Dh), UNLINK
  2349.       (AH=41h), and RENAME (AH=56h)
  2350. SeeAlso: AH=11h, AH=4Fh, AX=4301h, INT 2F/AX=111Bh
  2351.  
  2352. Format of FindFirst data block:
  2353. Offset    Size    Description
  2354. ---PCDOS 3.10, PCDOS 4.01, MSDOS 3.2/3.3---
  2355.  00h    BYTE    drive letter
  2356.  01h 11 BYTEs    search template
  2357.  0Ch    BYTE    search attributes
  2358. ---DOS 2.x (and some DOS 3.x???)---
  2359.  00h    BYTE    search attributes
  2360.  01h    BYTE    drive letter
  2361.  02h 11 BYTEs    search template
  2362. ---WILDUNIX.COM---
  2363.  00h 12 BYTEs    15-character wildcard search pattern and drive letter (packed)
  2364.  0Ch    BYTE    search attributes
  2365. ---DOS 2.x and most 3.x---
  2366.  0Dh    WORD    entry count within directory
  2367.  0Fh    DWORD    pointer to DTA???
  2368.  13h    WORD    cluster number of start of parent directory
  2369. ---PCDOS 4.01, MSDOS 3.2/3.3---
  2370.  0Dh    WORD    entry count within directory
  2371.  0Fh    WORD    cluster number of start of parent directory
  2372.  11h  4 BYTEs    reserved
  2373. ---all versions, documented fields---
  2374.  15h    BYTE    attribute of file found
  2375.  16h    WORD    file time
  2376.             bits 11-15: hour
  2377.             bits 5-10:    minute
  2378.             bits 0-4:    seconds/2
  2379.  18h    WORD    file date
  2380.             bits 9-15:    year-1980
  2381.             bits 5-8:    month
  2382.             bits 0-4:    day
  2383.  1Ah    DWORD    file size
  2384.  1Eh 13 BYTEs    ASCIZ filename+extension
  2385. ---------------------------------------------
  2386. INT 21 - DOS 2+ - FIND NEXT ASCIZ (FINDNEXT)
  2387.     AH = 4Fh
  2388.     [DTA] = data block from last AH = 4Eh/4Fh call
  2389. Return: CF set on error
  2390.         AX = error code (12h) (see AH=59h)
  2391.     CF clear if successful
  2392.         [DTA] = data block (see AH=4Eh)
  2393. SeeAlso: AH=12h, AH=4Eh
  2394. ---------------------------------------------
  2395. INT 21 - DOS 2+ internal - SET PSP SEGMENT
  2396.     AH = 50h
  2397.     BX = segment address of new PSP (see AH=26h for format)
  2398. Notes:    under DOS 2.x, this function cannot be invoked inside an INT 28h
  2399.       handler without setting the Critical Error flag
  2400.     under DOS 3+, this function does not use any of the DOS-internal stacks
  2401.       and is thus fully reentrant
  2402.     supported by OS/2 compatibility box
  2403. SeeAlso: AH=26h,51h,62h
  2404. ---------------------------------------------
  2405. INT 21 - DOS 2+ internal - GET PSP SEGMENT
  2406.     AH = 51h
  2407. Return: BX = current PSP segment (see AH=26h for format)
  2408. Notes:    under DOS 2.x, this function cannot be invoked inside an INT 28h
  2409.       handler without setting the Critical Error flag
  2410.     under DOS 3+, this function does not use any of the DOS-internal stacks
  2411.       and is thus fully reentrant
  2412.     supported by OS/2 compability box
  2413.     identical to the documented AH=62h
  2414. SeeAlso: AH=26h,50h,62h
  2415. ---------------------------------------------
  2416. INT 21 - DOS 2+ internal - GET LIST OF LISTS
  2417.     AH = 52h
  2418. Return: ES:BX -> DOS list of lists
  2419. Note:    partially supported by OS/2 v1.1 compatibility box (however, most
  2420.       pointers are FFFFh:FFFFh, LASTDRIVE is FFh, and the NUL header "next"
  2421.       pointer is FFFFh:FFFFh).
  2422.  
  2423. Format of List of Lists:
  2424. Offset    Size    Description
  2425.  -12    WORD    (DOS 3.1-3.3) sharing retry count (see AX=440Bh)
  2426.  -10    WORD    (DOS 3.1-3.3) sharing retry delay (see AX=440Bh)
  2427.  -8    DWORD    (DOS 3.x) pointer to current disk buffer
  2428.  -4    WORD    (DOS 3.x) pointer in DOS code segment of unread CON input
  2429.         when CON is read via a handle, DOS reads an entire line,
  2430.           and returns the requested portion, buffering the rest
  2431.           for the next read.  0000h indicates no unread input
  2432.  -2    WORD    segment of first memory control block
  2433.  00h    DWORD    pointer to first DOS Drive Parameter Block (see AH=32h)
  2434.  04h    DWORD    pointer to list of DOS file tables (see below)
  2435.  08h    DWORD    pointer to CLOCK$ device driver, resident or installable
  2436.  0Ch    DWORD    pointer to actual CON device driver, resident or installable
  2437. ---DOS 2.x---
  2438.  10h    BYTE    number of logical drives in system
  2439.  11h    WORD    maximum bytes/block of any block device
  2440.  13h    DWORD    pointer to first disk buffer (see below)
  2441.  17h 18 BYTEs    actual NUL device driver header (not a pointer!)
  2442.         This is the first device on DOS's linked list of device 
  2443.         drivers. (see below for format)
  2444. ---DOS 3.0---
  2445.  10h    BYTE    number of block devices
  2446.  11h    WORD    maximum bytes/block of any block device
  2447.  13h    DWORD    pointer to first disk buffer (see below)
  2448.  17h    DWORD    pointer to array of current directory structures (see below)
  2449.  1Bh    BYTE    value of LASTDRIVE command in CONFIG.SYS (default 5)
  2450.  1Ch    DWORD    pointer to STRING= workspace area
  2451.  20h    WORD    size of STRING area (the x in STRING=x from CONFIG.SYS)
  2452.  22h    DWORD    pointer to FCB table
  2453.  26h    WORD    the y in FCBS=x,y from CONFIG.SYS
  2454.  28h 18 BYTEs    actual NUL device driver header (not a pointer!)
  2455.         This is the first device on DOS's linked list of device 
  2456.         drivers. (see below for format)
  2457. ---DOS 3.1-3.3---
  2458.  10h    WORD    maximum bytes/block of any block device
  2459.  12h    DWORD    pointer to first disk buffer (see below)
  2460.  16h    DWORD    pointer to array of current directory structures (see below)
  2461.  1Ah    DWORD    pointer to FCB table (if CONFIG.SYS contains FCBS=)
  2462.  1Eh    WORD    number of protected FCBs (the y in FCBS=x,y)
  2463.  20h    BYTE    number of block devices
  2464.  21h    BYTE    value of LASTDRIVE command in CONFIG.SYS (default 5)
  2465.  22h 18 BYTEs    actual NUL device driver header (not a pointer!)
  2466.         This is the first device on DOS's linked list of device 
  2467.         drivers. (see below for format) (see also INT 2F/AX=122Ch)
  2468.  34h    BYTE    number of JOIN'ed drives
  2469. ---DOS 4.x---
  2470.  10h    WORD    maximum bytes/block of any block device
  2471.  12h    DWORD    pointer to disk buffer info (see below)
  2472.  16h    DWORD    pointer to array of current directory structures (see below)
  2473.  1Ah    DWORD    pointer to FCB table (if CONFIG.SYS contains FCBS=)
  2474.  1Eh    WORD    number of protected FCBs (the y in FCBS=x,y)
  2475.  20h    BYTE    number of block devices
  2476.  21h    BYTE    value of LASTDRIVE command in CONFIG.SYS (default 5)
  2477.  22h 18 BYTEs    actual NUL device driver header (not a pointer!)
  2478.         This is the first device on DOS's linked list of device 
  2479.         drivers. (see below for format) (see also INT 2F/AX=122Ch)
  2480.  34h    BYTE    number of JOIN'ed drives???
  2481.  35h    WORD    pointer within IBMDOS code segment to list of special program
  2482.         names (see below)
  2483.  37h    DWORD    pointer to FAR routine for utility functions (see below)
  2484.  3Bh    DWORD    pointer to chain of IFS (installable file system) drivers
  2485.  3Fh    WORD    the x in BUFFERS x,y (rounded up to multiple of 30 if in EMS)
  2486.  41h    WORD    the y in BUFFERS x,y
  2487.  43h    BYTE    boot drive (1=A:)
  2488.  44h    BYTE    ???
  2489.  45h    WORD    extended memory size in K
  2490.  
  2491. Call utility functions at [LoL+37h] with:
  2492.     AH = 20h miscellaneous functions
  2493.         AL = 00h get date
  2494.         Return: CX = year
  2495.             DH = month
  2496.             DL = day
  2497.         AL = 01h get process ID and computer ID
  2498.         Return: BX = current PSP segment
  2499.             DX = active network machine number
  2500.         AL = 05h get file system info
  2501.         ES:DI -> 16-byte info buffer
  2502.         Return: buffer filled
  2503.             Offset    Size    Description
  2504.              00h  2 BYTEs    unused
  2505.              02h    WORD    number of SFTs (actually counts only
  2506.                     the first two file table arrays)
  2507.              04h    WORD    number of FCB table entries
  2508.              06h    WORD    number of proctected FCBs
  2509.              08h  6 BYTEs    unused
  2510.              0Eh    WORD    largest sector size supported
  2511.         AL = 06h get machine name
  2512.         ES:DI -> 18-byte buffer for name
  2513.         Return: buffer filled with name starting at offset 02h
  2514.         AL = 08h get sharing retry count
  2515.         Return: BX = sharing retry count
  2516.         AL = other
  2517.         Return: CF set
  2518.     AH = 24h compare filenames
  2519.         DS:SI -> first ASCIZ filename
  2520.         ES:DI -> second ASCIZ filename
  2521.         Return: ZF set if files are same ignoring case and / vs \
  2522.     AH = 25h normalize filename
  2523.         DS:SI -> ASCIZ filename
  2524.         ES:DI -> buffer for result
  2525.         Return: filename uppercased, forward slashes changed to backslashes
  2526.     AH = 26h get DOS stack
  2527.         Return: DS:SI -> top of stack
  2528.             CX = size of stack in bytes
  2529.     AH = 27h increment InDOS flag
  2530.     AH = 28h decrement InDOS flag
  2531.  
  2532. Format of memory control block:
  2533. Offset    Size    Description
  2534.  00h    BYTE    block type: 5Ah if last block in chain, otherwise 4Dh
  2535.  01h    WORD    PSP segment of owner, 0000h if free, 0008h if belongs to DOS
  2536.  03h    WORD    size of memory block in paragraphs
  2537.  05h  3 BYTEs    unused
  2538. ---DOS 2.x,3.x---
  2539.  08h  8 BYTEs    unused
  2540. ---DOS 4.x---
  2541.  08h  8 BYTEs    ASCII program name if PSP memory block, else garbage
  2542.         null-terminated if less than 8 characters
  2543. Notes:    under DOS 3.1+, the first memory block is the DOS data segment,
  2544.       containing installable drivers, buffers, etc.
  2545.     under DOS 4.x it is divided into subsegments, each with its own memory
  2546.       control block (see below), the first of which is at offset 0000h
  2547.  
  2548. Format of DOS 4.x data segment subsegment control blocks:
  2549. Offset    Size    Description
  2550.  00h    BYTE    subsegment type (blocks typically appear in this order)
  2551.         "D"  device driver
  2552.         "E"  device driver appendage
  2553.         "I"  IFS (Installable File System) driver
  2554.         "F"  FILES=  control block storage area (for FILES>5)
  2555.         "X"  FCBS=   control block storage area, if present
  2556.         "C"  BUFFERS EMS workspace area (if BUFFERS /X option used)
  2557.         "B"  BUFFERS=  storage area
  2558.         "L"  LASTDRIVE=  current directory structure array storage area
  2559.         "S"  STACKS=  code and data area, if present (see below)
  2560.  01h    WORD    paragraph of subsegment start (usually the next paragraph)
  2561.  03h    WORD    size of subsegment in paragraphs
  2562.  05h  3 BYTEs    unused
  2563.  08h  8 BYTEs    for types "D" and "I", base name of file from which the driver
  2564.           was loaded (unused for other types)
  2565.  
  2566. Format of data at start of STACKS code segment (if present):
  2567. Offset    Size    Description
  2568.  00h    WORD    ???
  2569.  02h    WORD    number of stacks (the x in STACKS=x,y)
  2570.  04h    WORD    size of stack control block array (should be 8*x)
  2571.  06h    WORD    size of each stack (the y in STACKS=x,y)
  2572.  08h    DWORD    ptr to STACKS data segment
  2573.  0Ch    WORD    offset in STACKS data segment of stack control block array
  2574.  0Eh    WORD    offset in STACKS data segment of last element of that array
  2575.  10h    WORD    offset in STACKS data segment of the entry in that array for
  2576.         the next stack to be allocated (initially same as value in 0Eh
  2577.         and works its way down in steps of 8 to the value in 0Ch as
  2578.         hardware interrupts pre-empt each other)
  2579. Note:    the STACKS code segment data may, if present, be located as follows:
  2580.     DOS 3.2:    The code segment data is at a paragraph boundary fairly early
  2581.         in the IBMBIO segment (seen at 0070:0190h)
  2582.     DOS 3.3:    The code segment is at a paragraph boundary in the DOS data
  2583.         segment, which may be determined by inspecting the segment
  2584.         pointers of the vectors for those of interrupts 02h, 08h-0Eh,
  2585.         70h, 72-77h which have not been redirected by device drivers or
  2586.         TSRs.
  2587.     DOS 4.x:    Identified by sub-segment control block type "S" within the DOS
  2588.         data segment.
  2589.  
  2590. Format of array elements in STACKS data segment:
  2591. Offset    Size    Description
  2592.  00h    BYTE    status: 00h=free, 01h=in use, 03h=corrupted by overflow of
  2593.         higher stack.
  2594.  01h    BYTE    not used
  2595.  02h    WORD    previous SP
  2596.  04h    WORD    previous SS
  2597.  06h    WORD    ptr to word at top of stack (new value for SP). The word at the
  2598.         top of the stack is preset to point back to this control block.
  2599.  
  2600. SHARE.EXE hooks (DOS 3.1-4.01):
  2601. (offsets from first system file table--pointed at by ListOfLists+04h)
  2602. Offset    Size    Description
  2603. -3Ch    DWORD    pointer to FAR routine for ???
  2604.         Note: not called by MSDOS 3.3, set to 0000h:0000h by SHARE 3.3
  2605. -38h    DWORD    pointer to FAR routine called on opening file
  2606.         on call, internal DOS location points at filename(see AX=5D06h)
  2607.         Return: CF clear if successful
  2608.             CF set on error
  2609.                 AX = DOS error code (24h) (see AH=59h)
  2610.         Note: SHARE assumes DS=SS=DOS CS, direct-accesses DOS internals
  2611.             to get name of file just opened
  2612. -34h    DWORD    pointer to FAR routine called on closing file
  2613.         ES:DI -> system file table
  2614.         Note: SHARE assumes SS=DOS CS, directly accesses DOS internals
  2615.             does something to every lock record for file
  2616. -30h    DWORD    pointer to FAR routine to close all files for given computer
  2617.         (called by AX=5D03h)
  2618.         Note: SHARE assumes SS=DOS CS, directly accesses DOS internals
  2619. -2Ch    DWORD    pointer to FAR routine to close all files for given process
  2620.         (called by AX=5D04h)
  2621.         Note: SHARE assumes SS=DOS CS, directly accesses DOS internals
  2622. -28h    DWORD    pointer to FAR routine to close file by name
  2623.         (called by AX=5D02h)
  2624.         DS:SI -> DOS parameter list (see AX=5D00h)
  2625.            DPL's DS:DX -> name of file to close
  2626.         Return: CF clear if successful
  2627.             CF set on error
  2628.                 AX = DOS error code (03h) (see AH=59h)
  2629.         Note: SHARE assumes SS=DOS CS, directly accesses DOS internals
  2630. -24h    DWORD    pointer to FAR routine to lock region of file
  2631.         call with BX = file handle
  2632.               CX:DX = starting offset
  2633.               SI:AX = size
  2634.         Return: CF set on error
  2635.                 AL = DOS error code (21h) (see AH=59h)
  2636.         Note: only called if file is marked as remote
  2637.         Note: SHARE assumes SS=DOS CS, directly accesses DOS internals
  2638. -20h    DWORD    pointer to FAR routine to unlock region of file
  2639.         call with BX = file handle
  2640.               CX:DX = starting offset
  2641.               SI:AX = size
  2642.         Return: CF set on error
  2643.                 AL = DOS error code (21h) (see AH=59h)
  2644.         Note: only called if file is marked as remote
  2645.         Note: SHARE assumes SS=DOS CS, directly accesses DOS internals
  2646. -1Ch    DWORD    pointer to FAR routine to check if file region is locked
  2647.         call with ES:DI -> system file table entry for file
  2648.             CX = length of region from current position in file
  2649.         Return: CF set if any portion of region locked
  2650.                 AX = 0021h
  2651.         Note: SHARE assumes SS=DOS CS, directly accesses DOS internals
  2652. -18h    DWORD    pointer to FAR routine to get open file list entry
  2653.         (called by AX=5D05h)
  2654.         call with DS:SI -> DOS parameter list (see AX=5D00h)
  2655.             DPL's BX = index of sharing record
  2656.             DPL's CX = index of SFT in SFT chain of sharing rec
  2657.         Return: CF set on error or not loaded
  2658.                 AX = DOS error code (12h) (see AH=59h)
  2659.             CF clear if successful
  2660.                 ES:DI -> filename
  2661.                 CX = number of locks owned by specified SFT
  2662.                 BX = network machine number
  2663.                 DX destroyed
  2664.         Note: SHARE assumes SS=DOS CS, directly accesses DOS internals
  2665. -14h    DWORD    pointer to FAR routine for updating FCB from SFT???
  2666.         call with DS:SI -> unopened FCB
  2667.               ES:DI -> system file table entry
  2668.         Return: BL = C0h???
  2669.         Note: copies following fields from SFT to FCB:
  2670.            starting cluster of file      0Bh     1Ah
  2671.            sharing record offset      33h     1Ch
  2672.            file attribute          04h     1Eh
  2673. -10h    DWORD    pointer to FAR routine to get first cluster of FCB file ???
  2674.         call with ES:DI -> system file table entry
  2675.               DS:SI -> FCB
  2676.         Return: CF set if SFT closed or sharing record offsets
  2677.                 mismatched
  2678.             CF clear if successful
  2679.                 BX = starting cluster number from FCB
  2680. -0Ch    DWORD    pointer to FAR routine to close file if duplicate for process
  2681.         DS:SI -> system file table
  2682.         Return: AX = number of handle in JFT which already uses SFT
  2683.         Note: called during open/create of a file
  2684.         Note: SHARE assumes SS=DOS CS, directly accesses DOS internals
  2685.         Note: if SFT was opened with inheritance enabled and sharing
  2686.             mode 111, does something to all other SFTs owned by
  2687.             same process which have the same file open mode and
  2688.             sharing record
  2689. -08h    DWORD    pointer to FAR routine for ???
  2690.         Note: SHARE assumes SS=DS=DOS CS, direct-accesses DOS internals
  2691.         Note: closes various handles referring to file most-recently
  2692.             opened
  2693. -04h    DWORD    pointer to FAR routine to update directory info in related SFT
  2694.           entries
  2695.         call with ES:DI -> system file table entry for file (see below)
  2696.               AX = subfunction (apply to each related SFT)
  2697.                 00h: update time stamp (offset 0Dh) and date
  2698.                      stamp (offset 0Fh)
  2699.                 01h: update file size (offset 11h) and starting
  2700.                      cluster (offset 0Bh).  Sets last-accessed
  2701.                      cluster fields to start of file if file
  2702.                      never accessed
  2703.                 02h: as function 01h, but last-accessed fields
  2704.                      always changed
  2705.                 03h: do both functions 00h and 02h
  2706.         Note: follows ptr at offset 2Bh in system file table entries
  2707.         Note: NOP if opened with no-inherit or via FCB
  2708.  
  2709. Format of sharing record:
  2710. Offset    Size    Description
  2711.  00h    BYTE    flag
  2712.         00h free block
  2713.         01h allocated block
  2714.         FFh end marker
  2715.  01h    WORD    size of block
  2716.  03h    BYTE    checksum of pathname (including NUL)
  2717.         if sum of ASCII values is N, checksum is (N/256 + N%256)
  2718.  04h    WORD    offset in SHARE's DS of lock record (see below)
  2719.  06h    DWORD    pointer to start of system file table chain for file
  2720.  0Ah    WORD    unique sequence number
  2721.  0Ch    var    ASCIZ full pathname
  2722.  
  2723. Format of SHARE.EXE lock record:
  2724. Offset    Size    Description
  2725.  00h    WORD    offset in SHARE's DS of next lock table in list
  2726.  02h    DWORD    offset in file of start of locked region
  2727.  06h    DWORD    offset in file of end of locked region
  2728.  0Ah    DWORD    pointer to System File Table entry for this file
  2729.  0Eh    WORD    PSP segment of lock's owner
  2730.  
  2731. Format of DOS 2.x system file tables:
  2732. Offset    Size    Description
  2733.  00h    DWORD    pointer to next file table
  2734.  04h    WORD    number of files in this table
  2735.  06h  28h bytes per file
  2736.     Offset    Size    Description
  2737.      00h    BYTE    number of file handles referring to this file
  2738.      01h    BYTE    file open mode (see AH=3Dh)
  2739.      02h    BYTE    file attribute
  2740.      03h    BYTE    drive (0 = character device, 1 = A, 2 = B, etc)
  2741.      04h 11 BYTEs    filename in FCB format (no path,no period,blank-padded)
  2742.      0Fh    WORD    ???
  2743.      11h    WORD    ???
  2744.      13h    DWORD    file size???
  2745.      17h    WORD    file date in packed format (see AX=5700h)
  2746.      19h    WORD    file time in packed format (see AX=5700h)
  2747.      1Bh    BYTE    device attribute (see AX=4400h)
  2748.     ---character device---
  2749.      1Ch    DWORD    pointer to device driver
  2750.     ---block device---
  2751.      1Ch    WORD    starting cluster of file
  2752.      1Eh    WORD    relative cluster in file of last cluster accessed
  2753.     ------
  2754.      20h    WORD    absolute cluster number of current cluster
  2755.      22h    WORD    ???
  2756.      24h    DWORD    current file position???
  2757.  
  2758. Format of DOS 3.x system file tables and FCB tables:
  2759. Offset    Size    Description
  2760.  00h    DWORD    pointer to next file table
  2761.  04h    WORD    number of files in this table
  2762.  06h  35h bytes per file
  2763.     Offset    Size    Description
  2764.      00h    WORD    number of file handles referring to this file
  2765.      02h    WORD    file open mode (see AH=3Dh)
  2766.             bit 15 set if this file opened via FCB
  2767.      04h    BYTE    file attribute
  2768.      05h    WORD    device info word (see AX=4400h)
  2769.      07h    DWORD    pointer to device driver header if character device
  2770.             else pointer to DOS Drive Parameter Block (see AH=32h)
  2771.      0Bh    WORD    starting cluster of file
  2772.      0Dh    WORD    file time in packed format (see AX=5700h)
  2773.      0Fh    WORD    file date in packed format (see AX=5700h)
  2774.      11h    DWORD    file size
  2775.      15h    DWORD    current offset in file
  2776.      19h    WORD    relative cluster within file of last cluster accessed
  2777.      1Bh    WORD    absolute cluster number of last cluster accessed
  2778.             0000h if file never read or written???
  2779.      1Dh    WORD    number of sector containing directory entry
  2780.      1Fh    BYTE    number of dir entry within sector (byte offset/32)
  2781.      20h 11 BYTEs    filename in FCB format (no path/period, blank-padded)
  2782.      2Bh    DWORD    (SHARE.EXE) pointer to previous SFT sharing same file
  2783.      2Fh    WORD    (SHARE.EXE) network machine number which opened file
  2784.      31h    WORD    PSP segment of file's owner (see AH=26h)
  2785.      33h    WORD    offset within SHARE.EXE code segment of 
  2786.             sharing record (see below)  0000h = none
  2787.  
  2788. Format of DOS 4+ system file tables and FCB tables:
  2789. Offset    Size    Description
  2790.  00h    DWORD    pointer to next file table
  2791.  04h    WORD    number of files in this table
  2792.  06h  3Bh bytes per file
  2793.     Offset    Size    Description
  2794.      00h    WORD    number of file handles referring to this file
  2795.      02h    WORD    file open mode (see AH=3Dh)
  2796.             bit 15 set if this file opened via FCB
  2797.      04h    BYTE    file attribute
  2798.      05h    WORD    device info word (see AX=4400h)
  2799.             bit 15 set if remote file
  2800.             bit 14 set means do not set file date/time on closing
  2801.      07h    DWORD    pointer to device driver header if character device
  2802.             else pointer to DOS Drive Parameter Block (see AH=32h)
  2803.             or REDIR data
  2804.      0Bh    WORD    starting cluster of file
  2805.      0Dh    WORD    file time in packed format (see AX=5700h)
  2806.      0Fh    WORD    file date in packed format (see AX=5700h)
  2807.      11h    DWORD    file size
  2808.      15h    DWORD    current offset in file
  2809.     ---local file---
  2810.      19h    WORD    relative cluster within file of last cluster accessed
  2811.      1Bh    DWORD    number of sector containing directory entry
  2812.      1Fh    BYTE    number of dir entry within sector (byte offset/32)
  2813.     ---network redirector---
  2814.      19h    DWORD    pointer to REDIRIFS record
  2815.      1Dh  3 BYTEs    ???
  2816.     ------
  2817.      20h 11 BYTEs    filename in FCB format (no path/period, blank-padded)
  2818.      2Bh    DWORD    (SHARE.EXE) pointer to previous SFT sharing same file
  2819.      2Fh    WORD    (SHARE.EXE) network machine number which opened file
  2820.      31h    WORD    PSP segment of file's owner (see AH=26h)
  2821.      33h    WORD    offset within SHARE.EXE code segment of 
  2822.             sharing record (see below)  0000h = none
  2823.      35h    WORD    (local) absolute cluster number of last clustr accessed
  2824.             (redirector) ???
  2825.      37h    DWORD    pointer to IFS driver for file, 0000000h if native DOS
  2826.  
  2827. Format of current directory structure (array, 51h bytes [58h for DOS 4.x] per
  2828. drive):
  2829. Offset    Size    Description
  2830.  00h 67 BYTEs    current path as ASCIZ, starting with 'x:\'
  2831.  43h    WORD    bit flags
  2832.         bit 15: network drive    \ installable file system if both set
  2833.         bit 14: physical drive    / invalid drive if neither bit set
  2834.         bit 13: JOIN'ed, current path is actual path without JOIN
  2835.             drive letter in path may differ from logical drive name
  2836.         bit 12: SUBST'ed, current path is actual path without SUBST
  2837.             drive letter in path may differ from logical drive name
  2838.  45h    DWORD    pointer to DOS Disk Block for this drive
  2839. ---local drives---
  2840.  49h    WORD    starting cluster of current directory
  2841.         0000h = root, FFFFh never accessed
  2842.  4Bh    WORD    ??? seems always to be FFFFh
  2843.  4Dh    WORD    ??? seems always to be FFFFh
  2844. ---network drives---
  2845.  49h    DWORD    pointer to a redirector/REDIRIFS record, else FFFFFFFFh
  2846.  4Dh    WORD    stored parameter from INT 21/AX=5F03h???
  2847. ------
  2848.  4Fh    WORD    Offset of '\' in current path field representing root directory 
  2849.         of logical drive (2 if not SUBST'ed or JOIN'ed, otherwise 
  2850.         number of bytes in SUBST/JOIN path)
  2851. ---DOS 4.x---
  2852.  51h    BYTE    ??? used by network
  2853.  52h    DWORD    pointer to IFS driver for this drive, 00000000h if native DOS
  2854.  56h    WORD    ???
  2855.  
  2856. Format of device driver header:
  2857. Offset    Size    Description
  2858.  00h    DWORD    pointer to next driver, offset=FFFFh if last driver
  2859.  04h    WORD    device attributes
  2860.         Character device:
  2861.            bit 15  set
  2862.            bit 14  IOCTL supported (see AH=44h)
  2863.            bit 13  (DOS 3+) output until busy supported
  2864.            bit 12  reserved
  2865.            bit 11  (DOS 3+) OPEN/CLOSE/RemMedia calls supported
  2866.            bits 10-7 reserved
  2867.            bit 6  (DOS 3.2+) Generic IOCTL call supported (command 13h)
  2868.                 (see AX=440Ch,440Dh)
  2869.            bit 5  reserved
  2870.            bit 4  device is special (use INT 29 "fast console output")
  2871.            bit 3  device is CLOCK$ (all reads/writes use transfer
  2872.                 record described below)
  2873.            bit 2  device is NUL
  2874.            bit 1  device is standard output
  2875.            bit 0  device is standard input
  2876.         Block device:
  2877.            bit 15  clear
  2878.            bit 14  IOCTL supported
  2879.            bit 13  non-IBM format
  2880.            bit 12  reserved
  2881.            bit 11  (DOS 3+) OPEN/CLOSE/RemMedia calls supported
  2882.            bit 10  reserved
  2883.            bit 9   ??? set by DOS 3.3 DRIVER.SYS for "new" drives
  2884.            bit 8   ??? set by DOS 3.3 DRIVER.SYS for "new" drives
  2885.            bit 7   reserved
  2886.            bit 6  (DOS 3.2+) Generic IOCTL call supported (command 13h)
  2887.                 implies support for commands 17h and 18h
  2888.                 (see AX=440Ch,440Dh,440Eh,440Fh)
  2889.            bits 5-2 reserved
  2890.            bit 1   driver supports 32-bit sector addressing
  2891.            bit 0   reserved
  2892.  06h    WORD    device strategy entry point
  2893.         call with ES:BX -> request header (see INT 2F/AX=0802h)
  2894.  08h    WORD    device interrupt entry point
  2895. ---character device---
  2896.  0Ah  8 BYTEs    blank-padded character device name
  2897. ---block device---
  2898.  0Ah    BYTE    number of subunits (drives) supported by driver
  2899.  0Bh  7 BYTEs    unused
  2900. ---
  2901.  12h    WORD    (CD-ROM driver) reserved, must be 0000h
  2902.  14h    BYTE    (CD-ROM driver) drive letter (must initially be 00h)
  2903.  15h    BYTE    (CD-ROM driver) number of units
  2904.  16h  6 BYTEs    (CD-ROM driver) signature 'MSCDnn' where 'nn' is version 
  2905.             (currently '00')
  2906.  
  2907. Format of CLOCK$ transfer record:
  2908. Offset    Size    Description
  2909.  00h    WORD    number of days since 1-Jan-1980
  2910.  02h    BYTE    minutes
  2911.  03h    BYTE    hours
  2912.  04h    BYTE    hundredths of second
  2913.  05h    BYTE    seconds
  2914.  
  2915. Format of DOS 2.x disk buffer:
  2916. Offset    Size    Description
  2917.  00h    DWORD    pointer to next disk buffer, offset = FFFFh if last
  2918.         least-recently used buffer is first in chain
  2919.  04h    BYTE    drive (0=A, 1=B, etc), FFh if not in use
  2920.  05h  3 BYTEs    unused??? (seems always to be 00h 00h 01h)
  2921.  08h    WORD    logical sector number
  2922.  0Ah    BYTE    number of copies to write (1 for non-FAT sectors)
  2923.  0Bh    BYTE    sector offset between copies if multiple copies to be written
  2924.  0Ch    DWORD    pointer to DOS Drive Parameter Block (see AH=32h)
  2925.  10h        buffered data
  2926.  
  2927. Format of DOS 3.x disk buffer:
  2928. Offset    Size    Description
  2929.  00h    DWORD    pointer to next disk buffer, offset = FFFFh if last
  2930.         least-recently used buffer is first in chain
  2931.  04h    BYTE    drive (0=A,1=B, etc), FFh if not in use
  2932.  05h    BYTE    flags
  2933.         bit 7: ???
  2934.         bit 6: buffer dirty
  2935.         bit 5: buffer has been referenced
  2936.         bit 4: ???
  2937.         bit 3: sector in data area
  2938.         bit 2: sector in a directory, either root or subdirectory
  2939.         bit 1: sector in FAT
  2940.         bit 0: boot sector??? (guess)
  2941.  06h    WORD    logical sector number
  2942.  08h    BYTE    number of copies to write (1 for non-FAT sectors)
  2943.  09h    BYTE    sector offset between copies if multiple copies to be written
  2944.  0Ah    DWORD    pointer to DOS Drive Parameter Block (see AH=32h)
  2945.  0Eh    WORD    unused??? (almost always 0)
  2946.  10h        buffered data
  2947.  
  2948. Format of DOS 4.00 disk buffer info:
  2949. Offset    Size    Description
  2950.  00h    DWORD    pointer to array of disk buffer hash chain heads (see below)
  2951.  04h    WORD    number of disk buffer hash chains (referred to as NDBCH below)
  2952.  06h    DWORD    pointer to lookahead buffer, zero if not present
  2953.  0Ah    WORD    number of lookahead sectors, else zero (the y in BUFFERS=x,y)
  2954.  0Ch    BYTE    ???
  2955.  0Dh    WORD    EMS handle for buffers, zero if not in EMS
  2956.  0Fh    WORD    EMS physical page number used for buffers (usually 255)
  2957.  11h    WORD    ???
  2958.  13h    WORD    segment of EMS physical page frame
  2959.  15h    WORD    ??? seems always to be zero
  2960.  17h  4 WORDs    EMS partial page mapping information???
  2961.  
  2962. Format of DOS 4.01 (from UR 25066 on) disk buffer info:
  2963. Offset    Size    Description
  2964.  00h    DWORD    pointer to array of disk buffer hash chain heads (see below)
  2965.  04h    WORD    number of disk buffer hash chains (referred to as NDBCH below)
  2966.  06h    DWORD    pointer to lookahead buffer, zero if not present
  2967.  0Ah    WORD    number of lookahead sectors, else zero (the y in BUFFERS=x,y)
  2968.  0Ch  8 BYTEs    ???
  2969.  14h    DWORD    pointer to workspace buffer, purpose ???, allocated in main
  2970.         memory if BUFFERS/XS or /XD options in effect
  2971.  18h    WORD    EMS handle for buffers, zero if not in EMS
  2972.  1Ah    WORD    EMS physical page number used for buffers (usually 255)
  2973.  1Ch    WORD    ???
  2974.  1Eh    WORD    segment of EMS physical page frame
  2975.  20h    WORD    ???
  2976.  
  2977. Format of DOS 4.x disk buffer hash chain head (array, one entry per chain):
  2978. Offset    Size    Description
  2979.  00h    WORD    EMS logical page number in which chain is resident, -1 if not
  2980.         in EMS
  2981.  02h    DWORD    pointer to least recently used buffer header.  All buffers on
  2982.         this chain are in the same segment.
  2983.  06h    BYTE    number of dirty buffers on this chain
  2984.  07h    BYTE    reserved (00h)
  2985. Notes:    buffered disk sectors are assigned to chain N where N is the sector's
  2986.       address modulo NDBCH,  0 <= N <= NDBCH-1
  2987.     each chain resides completely within one EMS page
  2988.     this structure is in main memory even if buffers are in EMS
  2989.  
  2990. Format of DOS 4.x disk buffer:
  2991. Offset    Size    Description
  2992.  00h    WORD    forward ptr, offset only, to next least recently used buffer
  2993.  02h    WORD    backward ptr, offset only
  2994.  04h    BYTE    drive (0=A,1=B, etc), FFh if not in use
  2995.  05h    BYTE    flags
  2996.         bit 7: remote buffer
  2997.         bit 6: buffer dirty
  2998.         bit 5: buffer has been referenced
  2999.         bit 4: search data buffer (only valid if remote buffer)
  3000.         bit 3: sector in data area
  3001.         bit 2: sector in a directory, either root or subdirectory
  3002.         bit 1: sector in FAT
  3003.         bit 0: reserved
  3004.  06h    DWORD    logical sector number
  3005.  0Ah    BYTE    number of copies to write
  3006.         for FAT sectors, same as number of FATs
  3007.         for data and directory sectors, usually 1
  3008.  0Bh    WORD    offset in sectors between copies to write for FAT sectors
  3009.  0Dh    DWORD    pointer to DOS Drive Parameter Block (see AH=32h)
  3010.  11h    WORD    buffer use count if remote buffer (see flags above)
  3011.  13h    BYTE    reserved
  3012.  14h        buffered data
  3013. Note:    all buffered sectors which have the same hash value (computed as the
  3014.       sum of high and low words of the logical sector number divided by
  3015.       NDBCH) are on the same doubly-linked circular chain
  3016.     the links consist of offset addresses only, the segment being the same
  3017.       for all buffers in the chain.
  3018.  
  3019. Format of IFS driver list:
  3020. Offset    Size    Description
  3021.  00h    DWORD    pointer to next driver header
  3022.  04h 12 BYTEs    ???
  3023.  10h    DWORD    pointer to IFS utility function entry point (see below)
  3024.         call with ES:BX -> IFS request (see below)
  3025.  14h    WORD    offset in header's segment of driver entry point
  3026.     ???
  3027.  
  3028. Call IFS utility function entry point with:
  3029.     AH = 21h get redirection state
  3030.         BH = type (03h disk, 04h printer)
  3031.         Return: BH = state (00h off, 01h on)
  3032.     AH = 22h ??? some sort of time calculation
  3033.         AL = 00h ???
  3034.             nonzero ???
  3035.     AH = 23h ??? some sort of time calculation
  3036.  
  3037. Format of IFS request block:
  3038. Offset    Size    Description
  3039.  00h    WORD    total size in bytes of request
  3040.  02h    BYTE    class of request
  3041.         02h ???
  3042.         03h redirection
  3043.         04h ???
  3044.         05h file access
  3045.         06h convert error code to string
  3046.         07h ???
  3047.  03h    WORD    returned DOS error code
  3048.  05h    BYTE    IFS driver exit status
  3049.         00h success
  3050.         01h ???
  3051.         02h ???
  3052.         03h ???
  3053.         04h ???
  3054.         FFh internal failure
  3055.  06h 16 BYTEs    ???
  3056. ---request class 02h---
  3057.  16h    BYTE    function code
  3058.         04h ???
  3059.  17h    BYTE    unused???
  3060.  18h    DWORD    pointer to ???
  3061.  1Ch    DWORD    pointer to ???
  3062.  20h  2 BYTEs    ???
  3063. ---request class 03h---
  3064.  16h    BYTE    function code
  3065.  17h    BYTE    ???
  3066.  18h    DWORD    pointer to ???
  3067.  1Ch    DWORD    pointer to ???
  3068.  22h    WORD    returned ???
  3069.  24h    WORD    returned ???
  3070.  26h    WORD    returned ???
  3071.  28h    BYTE    returned ???
  3072.  29h    BYTE    unused???
  3073. ---request class 04h---
  3074.  16h    DWORD    pointer to ???
  3075.  1Ah    DWORD    pointer to ???
  3076. ---request class 05h---
  3077.  16h    BYTE    function code
  3078.         01h flush disk buffers
  3079.         02h get disk space
  3080.         03h MKDIR
  3081.         04h RMDIR
  3082.         05h CHDIR
  3083.         06h delete file
  3084.         07h rename file
  3085.         08h search directory
  3086.         09h file open/create
  3087.         0Ah LSEEK
  3088.         0Bh read from file
  3089.         0Ch write to file
  3090.         0Dh lock region of file
  3091.         0Eh commit/close file
  3092.         0Fh get/set file attributes
  3093.         10h printer control
  3094.         11h ???
  3095.         12h process termination
  3096.         13h ???
  3097.     ---class 05h function 01h---
  3098.      17h  7    BYTEs    ???
  3099.      1Eh    DWORD    pointer to ???
  3100.      22h  4 BYTEs    ???
  3101.      26h    BYTE    ???
  3102.      27h    BYTE    ???
  3103.     ---class 05h function 02h---
  3104.      17h  7 BYTEs    ???
  3105.      1Eh    DWORD    pointer to ???
  3106.      22h  4 BYTEs    ???
  3107.      26h    WORD    returned total clusters
  3108.      28h    WORD    returned sectors per cluster
  3109.      2Ah    WORD    returned bytes per sector
  3110.      2Ch    WORD    returned available clusters
  3111.      2Eh    BYTE    returned ???
  3112.      2Fh    BYTE    ???
  3113.     ---class 05h functions 03h,04h,05h---
  3114.      17h  7 BYTEs    ???
  3115.      1Eh    DWORD    pointer to ???
  3116.      22h  4 BYTEs    ???
  3117.      26h    DWORD    pointer to directory name
  3118.     ---class 05h function 06h---
  3119.      17h  7 BYTEs    ???
  3120.      1Eh    DWORD    pointer to ???
  3121.      22h  4 BYTEs    ???
  3122.      26h    WORD    attribute mask
  3123.      28h    DWORD    pointer to filename
  3124.     ---class 05h function 07h---
  3125.      17h  7 BYTEs    ???
  3126.      1Eh    DWORD    pointer to ???
  3127.      22h  4 BYTEs    ???
  3128.      26h    WORD    attribute mask
  3129.      28h    DWORD    pointer to source filespec
  3130.      2Ch    DWORD    pointer to destination filespec
  3131.     ---class 05h function 08h---
  3132.      17h  7 BYTEs    ???
  3133.      1Eh    DWORD    pointer to ???
  3134.      22h  4 BYTEs    ???
  3135.      26h    BYTE    00h FINDFIRST
  3136.             01h FINDNEXT
  3137.      28h    DWORD    pointer to FindFirst search data + 01h if FINDNEXT
  3138.      2Ch    WORD    search attribute if FINDFIRST
  3139.      2Eh    DWORD    pointer to filespec if FINDFIRST
  3140.     ---class 05h function 09h---
  3141.      17h  7 BYTEs    ???
  3142.      1Eh    DWORD    pointer to ???
  3143.      22h    DWORD    pointer to IFS open file structure (see below)
  3144.      26h    WORD    ???  \ together, specify open vs. create, whether or
  3145.      28h    WORD    ???  / not to truncate
  3146.      2Ah  4 BYTEs    ???
  3147.      2Eh    DWORD    pointer to filename
  3148.      32h  4 BYTEs    ???
  3149.      36h    WORD    file attributes on call
  3150.             returned ???
  3151.      38h    WORD    returned ???
  3152.     ---class 05h function 0Ah---
  3153.      17h  7 BYTEs    ???
  3154.      1Eh    DWORD    pointer to ???
  3155.      22h    DWORD    pointer to IFS open file structure (see below)
  3156.      26h    BYTE    seek type (02h = from end)
  3157.      28h    DWORD    offset on call
  3158.             returned new absolute position
  3159.     ---class 05h functions 0Bh,0Ch---
  3160.      17h  7 BYTEs    ???
  3161.      1Eh    DWORD    pointer to ???
  3162.      22h    DWORD    pointer to IFS open file structure (see below)
  3163.      28h    WORD    number of bytes to transfer
  3164.             returned bytes actually transferred
  3165.      2Ah    DWORD    transfer address
  3166.     ---class 05h function 0Dh---
  3167.      17h  7 BYTEs    ???
  3168.      1Eh    DWORD    pointer to ???
  3169.      22h    DWORD    pointer to IFS open file structure (see below)
  3170.      26h    BYTE    file handle???
  3171.      27h    BYTE    unused???
  3172.      28h    WORD    ???
  3173.      2Ah    WORD    ???
  3174.      2Ch    WORD    ???
  3175.      2Eh    WORD    ???
  3176.     ---class 05h function 0Eh---
  3177.      17h  7 BYTEs    ???
  3178.      1Eh    DWORD    pointer to ???
  3179.      22h    DWORD    pointer to IFS open file structure (see below)
  3180.      26h    BYTE    00h commit file
  3181.             01h close file
  3182.      27h    BYTE    unused???
  3183.     ---class 05h function 0Fh---
  3184.      17h  7 BYTEs    ???
  3185.      1Eh    DWORD    pointer to ???
  3186.      22h  4 BYTEs    ???
  3187.      26h    BYTE    02h GET attributes
  3188.             03h PUT attributes
  3189.      27h    BYTE    unused???
  3190.      28h 12 BYTEs    ???
  3191.      34h    WORD    search attributes???
  3192.      36h    DWORD    pointer to filename
  3193.      3Ah    WORD    (GET) returned ??? 
  3194.      3Ch    WORD    (GET) returned ???
  3195.      3Eh    WORD    (GET) returned ???
  3196.      40h    WORD    (GET) returned ???
  3197.      42h    WORD    (PUT) new attributes
  3198.             (GET) returned attributes
  3199.     ---class 05h function 10h---
  3200.      17h  7 BYTEs    ???
  3201.      1Eh    DWORD    pointer to ???
  3202.      22h    DWORD    pointer to IFS open file structure (see below)
  3203.      26h    WORD    ???
  3204.      28h    DWORD    pointer to ???
  3205.      2Ch    WORD    ???
  3206.      2Eh    BYTE    ???
  3207.      2Fh    BYTE    subfunction
  3208.             01h get printer setup
  3209.             03h ???
  3210.             04h ???
  3211.             05h ???
  3212.             06h ???
  3213.             07h ???
  3214.             21h set printer setup
  3215.     ---class 05h function 11h---
  3216.      17h  7 BYTEs    ???
  3217.      1Eh    DWORD    pointer to ???
  3218.      22h    DWORD    pointer to IFS open file structure (see below)
  3219.      26h    BYTE    subfunction
  3220.      27h    BYTE    unused???
  3221.      28h    WORD    ???
  3222.      2Ah    WORD    ???
  3223.      2Ch    WORD    ???
  3224.      2Eh    BYTE    ???
  3225.      2Fh    BYTE    ???
  3226.     ---class 05h function 12h---
  3227.      17h 15 BYTEs    unused???
  3228.      26h    WORD    PSP segment
  3229.      28h    BYTE    type of process termination
  3230.      29h    BYTE    unused???
  3231.     ---class 05h function 13h---
  3232.      17h 15 BYTEs    unused???
  3233.      26h    WORD    PSP segment
  3234. ---request class 06h---
  3235.  16h    DWORD    returned pointer to string corresponding to error code at 03h
  3236.  1Ah    BYTE    returned ???
  3237.  1Bh    BYTE    unused
  3238. ---request class 07h---
  3239.  16h    DWORD    pointer to IFS open file structure (see below)
  3240.  1Ah    BYTE    ???
  3241.  1Bh    BYTE    unused???
  3242.  
  3243. Format of IFS open file structure:
  3244. Offset    Size    Description
  3245.  00h    WORD    ???
  3246.  02h    WORD    device info word
  3247.  04h    WORD    file open mode
  3248.  06h    WORD    ???
  3249.  08h    WORD    file attributes
  3250.  0Ah    WORD    owner's network machine number
  3251.  0Ch    WORD    owner's PSP segment
  3252.  0Eh    DWORD    file size
  3253.  12h    DWORD    current offset in file
  3254.  16h    WORD    file time
  3255.  18h    WORD    file date
  3256.  1Ah 11 BYTEs    filename in FCB format
  3257.  25h    WORD    ???
  3258.  27h    WORD    hash value of SFT address
  3259.         (low word of linear address + segment&F000h)
  3260.  29h  3 WORDs    network info from SFT
  3261.  2Fh    WORD    ???
  3262.  
  3263. Format of one item in DOS 4 list of special program names:
  3264. Offset    Size    Description
  3265.  00h    BYTE    length of name (00h = end of list)
  3266.  01h  N BYTEs    name in format name.ext
  3267.  N    3 BYTEs    ???
  3268. ---------------------------------------------
  3269. INT 21 - DOS 2+ internal - TRANSLATE BIOS PARAMETER BLOCK
  3270.     AH = 53h
  3271.     DS:SI -> BPB (BIOS Parameter Block)
  3272.     ES:BP -> buffer for DOS Drive Parameter Block (see below)
  3273. Note:    translates BPB into a DOS Drive Parameter Block (see AH=32h)
  3274.  
  3275. Format of BIOS Parameter Block:
  3276. Offset    Size    Description
  3277.  00h    WORD    bytes/sector
  3278.  02h    BYTE    sectors/cluster. Get from (DPB byte 4) + 1
  3279.  03h    WORD    number of reserved sectors
  3280.  05h    BYTE    number of FATs
  3281.  06h    WORD    number of root directory entries
  3282.  08h    WORD    total number of sectors. Get from:
  3283.           ((DPB bytes 0Dh-0Eh) - 1) * (sectors/cluster (BPB byte 2))
  3284.             + (DPB Bytes 0Bh-0Ch)
  3285.         for DOS 4.0, set to zero if partition >32M, then set DWORD at
  3286.           15h to actual number of sectors
  3287.  0Ah    BYTE    media descriptor byte
  3288.  0Bh    WORD    number of sectors per FAT
  3289. ---DOS 3+---
  3290.  0Dh    WORD    number of sectors per track
  3291.  0Fh    WORD    number of heads
  3292.  11h    DWORD    number of hidden sectors
  3293.  15h 11 BYTEs    reserved    
  3294. ---DOS 4.0---
  3295.  15h    DWORD    total number of sectors if word at 08h contains zero
  3296.  19h  6 BYTEs    ???
  3297.  1Fh    WORD    number of cylinders
  3298.  21h    BYTE    device type
  3299.  22h    WORD    device attributes (removable or not, etc)
  3300. ---------------------------------------------
  3301. INT 21 - DOS 2+ - GET VERIFY FLAG
  3302.     AH = 54h
  3303. Return: AL = 00h if flag OFF
  3304.     AL = 01h if flag ON
  3305. SeeAlso: AH=2Eh
  3306. ---------------------------------------------
  3307. INT 21 - DOS 2+ internal - CREATE PSP
  3308.     AH = 55h
  3309.     DX = segment number at which to set up PSP (see AH=26h)
  3310.     SI = (DOS 3+) value to place in memory size field at DX:[0002h]
  3311. Notes:    like AH=26h but creates "child" PSP rather than copying existing one,
  3312.       incrementing the reference count for each inherited file
  3313.     (DOS 2+) sets current PSP to DX
  3314.     (DOS 3+) marks "no inherit" file handles as closed in child PSP
  3315. SeeAlso: AH=26h, AH=50h
  3316. ---------------------------------------------
  3317. INT 21 - DOS 2+ - RENAME A FILE
  3318.     AH = 56h
  3319.     DS:DX -> ASCIZ old name (drive and path allowed, no wildcards)
  3320.     ES:DI -> ASCIZ new name
  3321. Return: CF set on error
  3322.         AX = error code (02h,03h,05h,11h) (see AH=59h)
  3323.     CF clear if successful
  3324. Notes:    allows move between directories on same logical volume
  3325.     (DOS 3+) allows renaming of directories
  3326.     (DOS 3.1+) wildcards are allowed if invoked via AX=5D00h, in which case
  3327.       error 12h (no more files) is returned on success, and both source and
  3328.       destination specs must be canonical (as returned by AH=60h).
  3329.       Wildcards in the destination are replaced by the corresponding char
  3330.       of each source file being renamed.
  3331. SeeAlso: AH=17h,60h, AX=5D00h
  3332. ---------------------------------------------
  3333. INT 21 - DOS 2+ - GET FILE'S DATE/TIME
  3334.     AX = 5700h
  3335.     BX = file handle
  3336. Return: CF set on error
  3337.         AX = error code (01h,06h) (see AH=59h)
  3338.     CF clear if successful
  3339.         CX = time of last write
  3340.         bits 11-15: hour
  3341.              5-10:  minute
  3342.              0-4:   seconds/2
  3343.         DX = date of last write
  3344.         bits 9-15:   year-1980 (max 119 = 2099)
  3345.              5-8:    month
  3346.              0-4:    day
  3347. SeeAlso: AX=5701h
  3348. ---------------------------------------------
  3349. INT 21 - DOS 2+ - SET FILE'S DATE/TIME
  3350.     AX = 5701h
  3351.     BX = file handle
  3352.     CX = time to be set (see AX=5700h)
  3353.     DX = date to be set (see AX=5700h)
  3354. Return: CF set on error
  3355.         AX = error code (01h,06h) (see AH=59h)
  3356.     CF clear if successful
  3357. SeeAlso: AX=5700h
  3358. ---------------------------------------------
  3359. INT 21 - DOS 4.0 - GET ???
  3360.     AX = 5702h
  3361.     BX = ??? (0000h through 0004h)
  3362.     DS:SI -> ???
  3363.     ES:DI -> result buffer
  3364.     CX = size of result buffer
  3365. Return: CX = size of returned data
  3366. ---------------------------------------------
  3367. INT 21 - DOS 4.0 - GET ???
  3368.     AX = 5703h
  3369.     BX = ??? (0000h through 0004h)
  3370.     DS:SI -> ???
  3371.     ES:DI -> result buffer
  3372.     CX = size of result buffer
  3373. Return: CX = size of returned data
  3374. ---------------------------------------------
  3375. INT 21 - DOS 4.0 - ???
  3376.     AX = 5704h
  3377.     BX = ??? (0000h through 0004h)
  3378.     DS:SI -> ???
  3379.     ES:DI -> result buffer
  3380.     CX = size of result buffer
  3381. Return: nothing???
  3382. ---------------------------------------------
  3383. INT 21 - DOS 3+ - GET/SET MEMORY ALLOCATION STRATEGY
  3384.     AH = 58h
  3385.     AL = function code
  3386.         00h get allocation strategy
  3387.         01h set allocation strategy
  3388.            BL = strategy code
  3389.            00h first fit (use first memory block large enough)
  3390.            01h best fit (use smallest memory block large enough)
  3391.            02h last fit (use high part of last usable memory block)
  3392. Return: CF set on error
  3393.         AX = error code (01h) (see AH=59h)
  3394.     CF clear if successful
  3395.         AX = strategy code
  3396. Note: the Set subfunction accepts any value in BL; 2 or greater means last fit.
  3397.       the Get subfunction returns the last value set, so programs should check
  3398.       whether the value is >= 2, not just equal to 2.
  3399. SeeAlso: AH=48h,49h,4Ah
  3400. ---------------------------------------------
  3401. INT 21 - DOS 3+ - GET EXTENDED ERROR CODE
  3402.     AH = 59h
  3403.     BX = version code (0000h for DOS 3.x)
  3404. Return: AX = extended error code (see below)
  3405.     BH = class of error (see below)
  3406.     BL = suggested action (see below)
  3407.     CH = locus (where error occurred) (see below)
  3408.     CL, DX, SI, DI, BP, DS, and ES destroyed
  3409. Notes:    functions available under DOS 2.x map the true DOS 3+ error code into
  3410.       one supported under DOS 2.x
  3411.     you should call this function to retrieve the true error code when an
  3412.       FCB or DOS 2.x call returns an error
  3413. SeeAlso: AX=5D0Ah,INT 2F/AX=122Dh
  3414.  
  3415. Values for extended error code:
  3416.     01h function number invalid
  3417.     02h file not found
  3418.     03h path not found
  3419.     04h too many open files (no handles available)
  3420.     05h access denied
  3421.     06h invalid handle
  3422.     07h memory control block destroyed
  3423.     08h insufficient memory
  3424.     09h memory block address invalid
  3425.     0Ah environment invalid (usually >32K in length)
  3426.     0Bh format invalid
  3427.     0Ch access code invalid
  3428.     0Dh data invalid
  3429.     0Fh invalid drive
  3430.     10h attempted to remove current directory
  3431.     11h not same device
  3432.     12h no more files
  3433.     13h disk write-protected
  3434.     14h unknown unit
  3435.     15h drive not ready
  3436.     16h unknown command
  3437.     17h data error (CRC)
  3438.     18h bad request structure length
  3439.     19h seek error
  3440.     1Ah unknwon media type (non-DOS disk)
  3441.     1Bh sector not found
  3442.     1Ch printer out of paper
  3443.     1Dh write fault
  3444.     1Eh read fault
  3445.     1Fh general failure
  3446.     20h sharing violation
  3447.     21h lock violation
  3448.     22h disk change invalid
  3449.         ES:DI -> ASCIZ volume label of required disk
  3450.     23h FCB unavailable
  3451.     24h sharing buffer overflow
  3452.     25h reserved
  3453.     26h (LANtastic) cannot complete file operation
  3454.     27h-31h reserved
  3455.     32h Network request not supported (DOS 3.1 + MS Networks)
  3456.     33h Remote computer not listening
  3457.     34h Duplicate name on network
  3458.     35h Network name not found
  3459.     36h Network busy
  3460.     37h Network device no longer exists
  3461.     38h Network BIOS command limit exceeded
  3462.     39h Network adapter hardware error
  3463.     3Ah Incorrect response from network
  3464.     3Bh Unexpected network error
  3465.     3Ch Incompatible remote adapter
  3466.     3Dh Print queue full
  3467.     3Eh Queue not full
  3468.     3Fh Not enough space to print file
  3469.     40h Network name was deleted
  3470.     41h Network: Access denied
  3471.     42h Network device type incorrect
  3472.     43h Network name not found
  3473.     44h Network name limit exceeded
  3474.     45h Network BIOS session limit exceeded
  3475.     46h Temporarily paused
  3476.     47h Network request not accepted
  3477.     48h (DOS 3.1 + MS Networks) Print/disk redirection paused
  3478.     49h (LANtastic) invalid network version
  3479.     4Ah (LANtastic) account expired
  3480.     4Bh (LANtastic) password expired
  3481.     4Ch (LANtastic) login attempt invalid at this time
  3482.     4Dh-4Fh reserved
  3483.     50h file exists
  3484.     51h reserved
  3485.     52h cannot make directory
  3486.     53h fail on INT 24h
  3487.     54h (DOS 3.3+) too many redirections
  3488.     55h (DOS 3.3+) duplicate redirection
  3489.     56h (DOS 3.3+) invalid password
  3490.     57h (DOS 3.3+) invalid parameter
  3491.     58h (DOS 3.3+) network write fault
  3492.     59h (LANtastic) function not supported on network
  3493.     5Ah (LANtastic) required system component not installed
  3494. Values for Error Class:
  3495.     01h out of resource (storage space or I/O channels)
  3496.     02h temporary situation (file or record lock)
  3497.     03h authorization (denied access)
  3498.     04h internal (system software bug)
  3499.     05h hardware failure
  3500.     06h system failure (configuration file missing or incorrect)
  3501.     07h application program error
  3502.     08h not found
  3503.     09h bad format
  3504.     0Ah locked
  3505.     0Bh media error
  3506.     0Ch already exists
  3507.     0Dh unknown
  3508. Values for Suggested Action:
  3509.     01h retry
  3510.     02h delayed retry
  3511.     03h prompt user to reenter input
  3512.     04h abort after cleanup
  3513.     05h immediate abort
  3514.     06h ignore
  3515.     07h retry after user intervention
  3516. Values for Error Locus:
  3517.     01h unknown or not appropriate
  3518.     02h block device (disk error)
  3519.     03h network related
  3520.     04h serial device (timeout)
  3521.     05h memory related
  3522. ---------------------------------------------
  3523. INT 21 - DOS 3+ - CREATE UNIQUE FILE
  3524.     AH = 5Ah
  3525.     DS:DX -> ASCIZ directory path name ending with a '\' + 13 bytes to
  3526.          receive generated filename
  3527.     CX = file attributes (only bits 0,1,2,5 may be set)
  3528. Return: CF set on error
  3529.         AX = error code (03h,05h) (see AH=59h)
  3530.     CF clear if successful
  3531.         AX = file handle
  3532.     DS:DX -> path name
  3533. Note: The file created is not truly temporary.    It MUST be removed by the user.
  3534. SeeAlso: AH=3Ch,5Bh
  3535. ---------------------------------------------
  3536. INT 21 - DOS 3+ - CREATE NEW FILE
  3537.     AH = 5Bh
  3538.     DS:DX -> ASCIZ directory path name
  3539.     CX = file attribute (see AX=4301h)
  3540. Return: CF set on error
  3541.         AX = error code (03h,04h,05h,50h) (see AH=59h)
  3542.     CF clear if successful
  3543.         AX = file handle
  3544. Note:    unlike function 3Ch, function 5Bh will fail if the file already exists
  3545. SeeAlso: AH=3Ch,5Ah
  3546. ---------------------------------------------
  3547. INT 21 - DOS 3+ - LOCK/UNLOCK FILE ACCESS
  3548.     AH = 5Ch
  3549.     AL = 00h lock
  3550.          01h unlock
  3551.     BX = file handle
  3552.     CX:DX = starting offset of region to lock
  3553.     SI:DI = size of region to lock
  3554. Return: CF set on error
  3555.         AX = error code (01h,06h,21h) (see AH=59h)
  3556.     CF clear if successful
  3557. Note:    error returned unless SHARE or network installed
  3558. SeeAlso: AX=440Bh, INT 2F/AX=110Ah,110Bh
  3559. ---------------------------------------------
  3560. INT 21 - DOS 3.1+ internal - SERVER FUNCTION CALL
  3561.     AX = 5D00h
  3562.     DS:DX -> DOS parameter list (see below)
  3563.     DPL contains all register values for a call to INT 21h
  3564. Return: as appropriate for function being called
  3565. Notes:    does not check AH.  Out of range values will crash the system
  3566.     executes using specified computer ID and process ID
  3567.     sharing delay loops skipped
  3568.     a special sharing mode is enabled
  3569.     functions which take filenames require canonical names (as returned by
  3570.       AH=60h); this is apparently to prevent multi-hop file forwarding
  3571. SeeAlso: AH=60h
  3572.  
  3573. Format of DOS parameter list:
  3574. Offset    Size    Description
  3575.  00h    WORD    AX 
  3576.  02h    WORD    BX
  3577.  04h    WORD    CX
  3578.  06h    WORD    DX
  3579.  08h    WORD    SI
  3580.  0Ah    WORD    DI
  3581.  0Ch    WORD    DS
  3582.  0Eh    WORD    ES
  3583.  10h    WORD    reserved (0)
  3584.  12h    WORD    computer ID (0 = current system)
  3585.  14h    WORD    process ID (PSP segment on specified computer)
  3586. ---------------------------------------------
  3587. INT 21 - DOS 3.1+ internal - COMMIT ALL FILES FOR SPECIFIED COMPUTER/PROCESS
  3588.     AX = 5D01h
  3589.     DS:DX -> DOS parameter list (see AX=5D00h), only computer ID and
  3590.         process ID fields used
  3591. Return: CF set on error
  3592.         AX = error code (see AH=59h)
  3593.     CF clear if successful
  3594. Notes:    flushes buffers and updates directory entries for each file which has
  3595.       been written to; if remote file, calls INT 2F/AX=1107h
  3596.     the computer ID and process ID are stored but ignored under DOS 3.3
  3597. SeeAlso: AH=68h, INT 2F/AX=1107h
  3598. ---------------------------------------------
  3599. INT 21 - DOS 3.1+ internal - SHARE.EXE - CLOSE FILE BY NAME
  3600.     AX = 5D02h
  3601.     DS:DX -> DOS parameter list (see AX=5D00h), only fields DX, DS,
  3602.         computer ID, and process ID used
  3603.     DPL's DS:DX -> ASCIZ name of file to close
  3604. Return: CF set on error
  3605.         AX = error code (see AH=59h)
  3606.     CF clear if successful
  3607. Notes:    error unless SHARE is loaded (calls [SysFileTable-28h]) (see AH=52h)
  3608.     name must be canonical fully-qualified, such as returned by AH=60h
  3609. SeeAlso: AX=5D03h,5D04h,AH=3Eh,60h
  3610. ---------------------------------------------
  3611. INT 21 - DOS 3.1+ internal - SHARE.EXE - CLOSE ALL FILES FOR GIVEN COMPUTER
  3612.     AX = 5D03h
  3613.     DS:DX -> DOS parameter list (see AX=5D00h), only computer ID used
  3614. Return: CF set on error
  3615.         AX = error code (see AH=59h)
  3616.     CF clear if successful
  3617. Note:    error unless SHARE is loaded (calls [SysFileTable-30h]) (see AH=52h)
  3618. SeeAlso: AX=5D02h,5D04h
  3619. ---------------------------------------------
  3620. INT 21 - DOS 3.1+ internal - SHARE.EXE - CLOSE ALL FILES FOR GIVEN PROCESS
  3621.     AX = 5D04h
  3622.     DS:DX -> DOS parameter list (see AX=5D00h), only computer ID and
  3623.         process ID fields used
  3624. Return: CF set on error
  3625.         AX = error code (see AH=59h)
  3626.     CF clear if successful
  3627. Note:    error unless SHARE is loaded (calls [SysFileTable-2Ch]) (see AH=52h)
  3628. SeeAlso: AX=5D02h,5D03h
  3629. ---------------------------------------------
  3630. INT 21 - DOS 3.1+ internal - SHARE.EXE - GET OPEN FILE LIST ENTRY
  3631.     AX = 5D05h
  3632.     DS:DX -> DOS parameter list (see AX=5D00h)
  3633.     DPL's BX = index of sharing record
  3634.     DPL's CX = index of SFT in sharing record's SFT list
  3635. Return: CF clear if successful
  3636.         ES:DI -> ASCIZ filename
  3637.         BX = network machine number of SFT's owner
  3638.         CX = number of locks held by SFT's owner
  3639.     CF set if either index out of range
  3640.         AX = 0012h (no more files)
  3641. Notes:    error unless SHARE is loaded (calls [SysFileTable-18h]) (see AH=52h)
  3642.     names are always canonical fully-qualified, such as returned by AH=60h
  3643. SeeAlso: AH=5Ch,60h 
  3644. ---------------------------------------------
  3645. INT 21 - DOS 3.0+ internal - GET ADDRESS OF DOS SWAPPABLE DATA AREA
  3646.     AX = 5D06h
  3647. Return: CF set on error
  3648.        AX = error code (see AH=59h)
  3649.     CF clear if successful
  3650.         DS:SI -> nonreentrant data area (includes all three DOS stacks)
  3651.         (critical error flag is first byte)
  3652.         CX = size in bytes of area which must be swapped while in DOS
  3653.         DX = size in bytes of area which must always be swapped
  3654. Notes:    the Critical Error flag is used in conjunction with the InDOS flag
  3655.       (see AH=34h) to determine when it is safe to enter DOS from a TSR
  3656.     setting CritErr flag allows use of functions 50h/51h from INT 28h under
  3657.       DOS 2.x by forcing use of correct stack
  3658.     swapping the data area allows reentering DOS unless DOS is in a
  3659.       critical section delimited by INT 2A/AH=80h and INT 2A/AH=81h,82h
  3660.     under DOS 4.0, AX=5D0Bh should be used instead of this function
  3661. SeeAlso: AX=5D0Bh, INT 2A/AH=80h,81h,82h
  3662.  
  3663. Format of DOS 3.10-3.30 Swappable Data Area:
  3664. Offset    Size    Description
  3665.  00h    BYTE    critical error flag
  3666.  01h    BYTE    InDOS flag (count of active INT 21 calls)
  3667.  02h    BYTE    drive on which current critical error occurred, or FFh
  3668.  03h    BYTE    locus of last error
  3669.  04h    WORD    extended error code of last error
  3670.  06h    BYTE    suggested action for last error
  3671.  07h    BYTE    class of last error
  3672.  08h    DWORD    ES:DI pointer for last error
  3673.  0Ch    DWORD    current DTA
  3674.  10h    WORD    current PSP
  3675.  12h    WORD    stores SP across an INT 23
  3676.  14h    WORD    return code from last process termination (zerod after reading
  3677.         with AH=4Dh)
  3678.  16h    BYTE    current drive
  3679.  17h    BYTE    extended break flag
  3680. ---remainder need only be swapped if in DOS---
  3681.  18h    WORD    value of AX on call to INT 21
  3682.  1Ah    WORD    PSP segment for sharing/network
  3683.  1Ch    WORD    network machine number for sharing/network (0000h = us)
  3684.  1Eh    WORD    first usable memory block found when allocating memory
  3685.  20h    WORD    best usable memory block found when allocating memory
  3686.  22h    WORD    last usable memory block found when allocating memory
  3687.  24h  2 BYTEs    ??? (don't seem to be referenced)
  3688.  26h    WORD    ???
  3689.  28h    BYTE    ???
  3690.  29h    BYTE    ???
  3691.  2Ah    BYTE    ???
  3692.  2Bh    BYTE    ??? flag of some kind
  3693.  2Ch    BYTE    ??? flag of some kind
  3694.  2Dh    BYTE    ??? (doesn't seem to be referenced)
  3695.  2Eh    BYTE    day of month
  3696.  2Fh    BYTE    month
  3697.  30h    WORD    year - 1980
  3698.  32h    WORD    number of days since 1-1-1980
  3699.  32h    BYTE    day of week (0 = Sunday)
  3700.  35h    BYTE    ???
  3701.  36h    BYTE    ??? flag
  3702.  37h    BYTE    ??? flag
  3703.  38h 26 BYTEs    device driver request header
  3704.  52h    DWORD    pointer to device driver entry point (used in calling driver)
  3705.  56h 22 BYTEs    device driver request header
  3706.  6Ch 22 BYTEs    device driver request header
  3707.  82h    BYTE    type of PSP copy (00h=simple for INT 21/AH=26h, FFh=make child)
  3708.  83h    BYTE    ??? apparently not reference by kernel
  3709.  84h    WORD    ???
  3710.  86h    WORD    ???
  3711.  88h  2 BYTEs    ???
  3712.  8Ah  6 BYTEs    CLOCK$ transfer record (see AH=52h)
  3713.  90h  2 BYTEs    ???
  3714.  92h 128 BYTEs    buffer for filename
  3715. 112h 128 BYTEs    buffer for filename
  3716. 192h 21 BYTEs    findfirst/findnext search data block (see AH=4Eh)
  3717. 1A7h 32 BYTEs    directory entry for found file
  3718. 1C7h 81 BYTEs    copy of current directory structure for drive being accessed
  3719. 218h 11 BYTEs    ??? FCB-format filename
  3720. 223h    BYTE    ???
  3721. 224h 11 BYTEs    wildcard destination specification for rename (FCB format)
  3722. 22Fh  2 BYTEs    ???
  3723. 231h    WORD    ???
  3724. 233h  5 BYTEs    ???
  3725. 238h    BYTE    directory search attributes
  3726. 239h    BYTE    type of FCB (00h regular, FFh extended)
  3727. 23Ah    BYTE    extended FCB file attribute
  3728. 23Bh    BYTE    file open mode???
  3729. 23Ch    BYTE    ??? flag bits
  3730. 23Dh    BYTE    ??? flag or counter
  3731. 23Eh    BYTE    ??? flag
  3732. 23Fh    BYTE    flag indicating how DOS function was invoked
  3733.         (00h = direct INT 20/INT 21, FFh = server call AX=5D00h)
  3734. 240h    WORD    ???
  3735. 242h    BYTE    ???
  3736. 243h    BYTE    ???
  3737. 244h    BYTE    ???
  3738. 245h    BYTE    ??? flag or counter
  3739. 246h    BYTE    ??? flag
  3740. 247h    BYTE    ??? flag
  3741. 248h    BYTE    ??? flag
  3742. 249h    BYTE    type of process termination (00h-03h)
  3743. 24Ah    BYTE    ??? flag
  3744. 24Bh    BYTE    value with which to replace first byte of deleted file's name
  3745.         (normally E5h, but 00h as described under INT 21/AH=13h)
  3746. 24Ch    DWORD    pointer to Drive Parameter Block for critical error invocation
  3747. 250h    DWORD    pointer to stack frame containing user registers on INT 21
  3748. 254h    WORD    stores SP???
  3749. 256h    DWORD    pointer to DOS Drive Parameter Block for ???
  3750. 25Ah    WORD    ???
  3751. 25Ch    WORD    ???
  3752. 25Eh    WORD    ??? flag
  3753. 260h    WORD    ???
  3754. 262h    BYTE    Media ID byte returned by AH=1Bh,1Ch
  3755. 263h    BYTE    ??? (doesn't seem to be referenced)
  3756. 264h    DWORD    pointer to ???
  3757. 268h    DWORD    pointer to current SFT
  3758. 26Ch    DWORD    pointer to current directory structure for drive being accessed
  3759. 270h    DWORD    pointer to caller's FCB
  3760. 274h    WORD    ???
  3761. 276h    WORD    temporary storage for file handle
  3762. 278h    DWORD    pointer to a JFT entry in process handle table (see AH=26h)
  3763. 27Ch    WORD    offset in DOS CS of first filename argument
  3764. 27Eh    WORD    offset in DOS CS of second filename argument
  3765. 280h    WORD    ???
  3766. 282h    WORD    ???
  3767. 284h    WORD    ???
  3768. 286h    WORD    ???
  3769. 288h    WORD    ???
  3770. 28Ah    WORD    ???
  3771. 28Ch    WORD    ???
  3772. 28Eh  2 BYTEs    ???
  3773. 290h    WORD    ???
  3774. 292h    DWORD    current offset in file
  3775. 296h    WORD    ???
  3776. 298h    WORD    ???
  3777. 29Ah    WORD    ???
  3778. 29Ch    WORD    ???
  3779. 29Eh    WORD    ???
  3780. 2A0h    WORD    ???
  3781. 2A2h    DWORD    number of bytes appended to file
  3782. 2A6h    DWORD    pointer to ??? disk buffer
  3783. 2AAh    DWORD    pointer to ??? SFT
  3784. 2AEh    WORD    used by INT 21 dispatcher to store caller's BX
  3785. 2B0h    WORD    used by INT 21 dispatcher to store caller's DS
  3786. 2B2h    WORD    temporary storage while saving/restoring caller's registers
  3787. 2B4h    DWORD    pointer to prev call frame (offset 250h) if INT 21 reentered
  3788.         also switched to for duration of INT 24
  3789. 2B8h 21 BYTEs    FindFirst search data for source file(s) of a rename operation
  3790.         (see AH=4Eh)
  3791. 2CDh 32 BYTEs    directory entry for file being renamed
  3792. 2EDh 331 BYTEs    critical error stack
  3793. 438h 384 BYTEs    disk stack (functions greater than 0Ch, INT 25, INT 26)
  3794. 5B8h 384 BYTEs    character I/O stack (functions 01h through 0Ch)
  3795. ---DOS 3.3 only---
  3796. 738h    BYTE    flag affecting AH=08h (see AH=64h)
  3797. 739h    BYTE    ??? looks like a drive number
  3798. 73Ah    BYTE    ??? flag of some kind
  3799. 73Ah    BYTE    ???
  3800. ---------------------------------------------
  3801. INT 21 - DOS 3.1+ network - GET REDIRECTED PRINTER MODE
  3802.     AX = 5D07h
  3803. Return: DL = mode
  3804.         00h redirected output is combined
  3805.         01h redirected output in separate print jobs
  3806. SeeAlso: AX=5D08h,5D09h, INT 2F/AX=1125h
  3807. ---------------------------------------------
  3808. INT 21 - DOS 3.1+ network - SET REDIRECTED PRINTER MODE
  3809.     AX = 5D08h
  3810.     DL = mode
  3811.         00h redirected output is combined
  3812.         01h redirected output placed in separate jobs, start new print job
  3813.         now
  3814. SeeAlso: AX=5D07h,5D09h, INT 2F/AX=1125h
  3815. ---------------------------------------------
  3816. INT 21 - DOS 3.1+ network - FLUSH REDIRECTED PRINTER OUTPUT
  3817.     AH = 5D09h
  3818. Note:    forces redirected printer output to be printed, and starts a new print
  3819.       job
  3820. SeeAlso: AX=5D07h,5D08h, INT 2F/AX=1125h
  3821. ---------------------------------------------
  3822. INT 21 - DOS 3.1+ internal - SET EXTENDED ERROR INFORMATION
  3823.     AX = 5D0Ah
  3824.     DS:DX -> 11-word DOS parameter list (see AX=5D00h)
  3825. Return: nothing.  next call to AH=59h will return values from fields AX,BX,CX,
  3826.       DX,DI, and ES in corresponding registers
  3827. SeeAlso: AH=59h
  3828. ---------------------------------------------
  3829. INT 21 - DOS 4.x internal - GET DOS SWAPPABLE DATA AREAS
  3830.     AX = 5D0Bh
  3831. Return: CF set on error
  3832.         AX = error code (see AH=59h)
  3833.     CF clear if successful
  3834.         DS:SI -> swappable data area list (see below)
  3835. Note:    copying and restoring the swappable data areas allows DOS to be
  3836.       reentered unless it is in a critical section delimited by calls to
  3837.       INT 2A/AH=80h and INT 2A/AH=81h,82h
  3838. SeeAlso: AX=5D06h, INT 2A/AH=80h,81h,82h
  3839.  
  3840. Format of swappable data area list:
  3841. Offset    Size    Description
  3842.  00h    WORD    count of data areas
  3843.  02h  N BYTEs    "count" copies of data area record
  3844.         Offset    Size    Description
  3845.          00h    DWORD    address
  3846.          04h    WORD    length and type
  3847.                 bit 15 set if swap always, clear if swap in DOS
  3848.                 bits 14-0: length in bytes
  3849.  
  3850. Format of PCDOS 4.01 swappable data area:
  3851. Offset    Size    Description
  3852.  00h    BYTE    critical error flag
  3853.  01h    BYTE    InDOS flag (count of active INT 21 calls)
  3854.  02h    BYTE    ??? drive number or FFh
  3855.  03h    BYTE    locus of last error
  3856.  04h    WORD    extended error code of last error
  3857.  06h    BYTE    suggested action for last error
  3858.  07h    BYTE    class of last error
  3859.  08h    DWORD    ES:DI pointer for last error
  3860.  0Ch    DWORD    current DTA
  3861.  10h    WORD    current PSP
  3862.  12h    WORD    stores SP across an INT 23
  3863.  14h    WORD    return code from last process termination (zerod after reading
  3864.         with AH=4Dh)
  3865.  16h    BYTE    current drive
  3866.  17h    BYTE    extended break flag
  3867.  18h  2 BYTEs    ???
  3868. ---remainder need only be swapped if in DOS---
  3869.  1Ah    WORD    value of AX on call to INT 21
  3870.  1Ch    WORD    PSP segment for sharing/network
  3871.  1Eh    WORD    network machine number for sharing/network (0000h = us)
  3872.  20h    WORD    first usable memory block found when allocating memory
  3873.  22h    WORD    best usable memory block found when allocating memory
  3874.  24h    WORD    last usable memory block found when allocating memory
  3875.  26h  2 BYTEs    ??? (don't seem to be referenced)
  3876.  28h    WORD    ???
  3877.  2Ah    BYTE    ???
  3878.  2Bh    BYTE    ???
  3879.  2Ch    BYTE    ???
  3880.  2Dh    BYTE    ???
  3881.  2Eh    BYTE    ???
  3882.  2Fh    BYTE    ??? (doesn't seem to be referenced)
  3883.  30h    BYTE    day of month
  3884.  31h    BYTE    month
  3885.  32h    WORD    year - 1980
  3886.  34h    WORD    number of days since 1-1-1980
  3887.  36h    BYTE    day of week (0 = Sunday)
  3888.  37h    BYTE    ???
  3889.  38h    BYTE    ???
  3890.  39h    BYTE    ???
  3891.  38h 30 BYTEs    device driver request header
  3892.  58h    DWORD    pointer to device driver entry point (used in calling driver)
  3893.  5Ch 22 BYTEs    device driver request header
  3894.  72h 30 BYTEs    device driver request header
  3895.  90h  6    BYTEs    ???
  3896.  96h  6 BYTEs    CLOCK$ transfer record (see AH=52h)
  3897.  9Ch  2 BYTEs    ???
  3898.  9Eh 128 BYTEs    buffer for filename
  3899. 11Eh 128 BYTEs    buffer for filename
  3900. 19Eh 21 BYTEs    findfirst/findnext search data block (see AH=4Eh)
  3901. 1B3h 32 BYTEs    directory entry for found file
  3902. 1D3h 88 BYTEs    copy of current directory structure for drive being accessed
  3903. 22Bh 11 BYTEs    ??? FCB-format filename
  3904. 236h    BYTE    ???
  3905. 237h 11 BYTEs    wildcard destination specification for rename (FCB format)
  3906. 242h  2 BYTEs    ???
  3907. 244h    WORD    ???
  3908. 246h  5 BYTEs    ???
  3909. 24Bh    BYTE    ???
  3910. 24Ch    BYTE    ???
  3911. 24Dh    BYTE    attribute mask for directory search???
  3912. 24Eh    BYTE    ???
  3913. 24Fh    BYTE    ??? flag bits
  3914. 250h    BYTE    ???
  3915. 251h    BYTE    ???
  3916. 252h    BYTE    flag indicating how DOS function was invoked
  3917.         (00h = direct INT 20/INT 21, FFh = server call AX=5D00h)
  3918. 253h    BYTE    ???
  3919. 254h    BYTE    ???
  3920. 255h    BYTE    ???
  3921. 256h    BYTE    ???
  3922. 257h    BYTE    ???
  3923. 258h    BYTE    ???
  3924. 259h    BYTE    ???
  3925. 25Ah    BYTE    ???
  3926. 25Bh    BYTE    ???
  3927. 25Ch    BYTE    type of process termination (00h-03h)
  3928. 25Dh    BYTE    ???
  3929. 25Eh    BYTE    ???
  3930. 25Fh    BYTE    ???
  3931. 260h    DWORD    pointer to Drive Parameter Block for critical error invocation
  3932. 264h    DWORD    pointer to stack frame containing user registers on INT 21
  3933. 268h    WORD    stores SP???
  3934. 26Ah    DWORD    pointer to DOS Drive Parameter Block for ???
  3935. 26Eh    WORD    segment of disk buffer
  3936. 270h    WORD    ???
  3937. 272h    WORD    ???
  3938. 274h    WORD    ???
  3939. 276h    WORD    ???
  3940. 278h    BYTE    Media ID byte returned by AH=1Bh,1Ch
  3941. 279h    BYTE    ??? (doesn't seem to be referenced)
  3942. 27Ah    DWORD    pointer to ???
  3943. 27Eh    DWORD    pointer to current SFT
  3944. 282h    DWORD    pointer to current directory structure for drive being accessed
  3945. 286h    DWORD    pointer to caller's FCB
  3946. 28Ah    WORD    ???
  3947. 28Ch    WORD    ???
  3948. 28Eh    DWORD    pointer to a JFT entry in process handle table (see AH=26h)
  3949. 292h    WORD    offset in DOS CS of first filename argument
  3950. 294h    WORD    offset in DOS CS of second filename argument
  3951. 296h    WORD    ???
  3952. 298h    WORD    ???
  3953. 29Ah    WORD    ???
  3954. 29Ch    WORD    ???
  3955. 29Eh    WORD    ???
  3956. 2A0h    WORD    ???
  3957. 2A2h    WORD    ??? directory cluster number???
  3958. 2A4h    DWORD    ???
  3959. 2A8h    DWORD    ???
  3960. 2ACh    WORD    ???
  3961. 2AEh    DWORD    offset in file???
  3962. 2B2h    WORD    ???
  3963. 2B4h    WORD    bytes in partial sector
  3964. 2B6h    WORD    number of sectors
  3965. 2B8h    WORD    ???
  3966. 2BAh    WORD    ???
  3967. 2BCh    WORD    ???
  3968. 2BEh    DWORD    number of bytes appended to file
  3969. 2C2h    DWORD    pointer to ??? disk buffer
  3970. 2C6h    DWORD    pointer to ??? SFT
  3971. 2CAh    WORD    used by INT 21 dispatcher to store caller's BX
  3972. 2CCh    WORD    used by INT 21 dispatcher to store caller's DS
  3973. 2CEh    WORD    temporary storage while saving/restoring caller's registers
  3974. 2D0h    DWORD    pointer to prev call frame (offset 264h) if INT 21 reentered
  3975.         also switched to for duration of INT 24
  3976. 2D4h    WORD    ???
  3977. 2D6h    BYTE    ???
  3978. 2D7h    WORD    ???
  3979. 2D9h    DWORD    pointer to ???
  3980. 2DDh    WORD    ???
  3981. 2DFh    WORD    ???
  3982. 2E1h    WORD    ???
  3983. 2E3h    DWORD    ???
  3984. 2E7h    WORD    ???
  3985. 2E9h    WORD    ???
  3986. 2EBh    BYTE    ???
  3987. 2ECh    WORD    stores DS during call to [List-of-Lists + 37h]
  3988. 2EEh    WORD    ???
  3989. 2F0h    BYTE    ???
  3990. 2F1h    WORD    ??? bit flags
  3991. 2F3h    DWORD    pointer to user-supplied filename
  3992. 2F7h    DWORD    pointer to ???
  3993. 2FBh    WORD    stores SS during call to [List-of-Lists + 37h]
  3994. 2FDh    WORD    stores SP during call to [List-of-Lists + 37h]
  3995. 2FFh    BYTE    flag, nonzero if stack switched in calling [List-of-Lists+37h]
  3996. 300h 21 BYTEs    FindFirst search data for source file(s) of a rename operation
  3997.         (see AH=4Eh)
  3998. 315h 32 BYTEs    directory entry for file being renamed
  3999. 335h 331 BYTEs    critical error stack
  4000. 480h 384 BYTEs    disk stack (functions greater than 0Ch, INT 25, INT 26)
  4001. 600h 384 BYTEs    character I/O stack (functions 01h through 0Ch)
  4002. 780h    BYTE    flag affecting AH=08h (see AH=64h)
  4003. 781h    BYTE    ??? looks like a drive number
  4004. 782h    BYTE    ??? flag of some kind
  4005. 783h    BYTE    ???
  4006. 784h    WORD    ???
  4007. 786h    WORD    ???
  4008. 788h    WORD    ???
  4009. 78Ah    WORD    ???
  4010. ---------------------------------------------
  4011. INT 21 - DOS 3.1 + Microsoft Networks - GET MACHINE NAME
  4012.     AX = 5E00h
  4013.     DS:DX -> buffer for blank-padded ASCIZ name (16 bytes)
  4014. Return: CF set on error
  4015.         AX = error code (01h) (see AH=59h)
  4016.     CH = 00h if name not defined
  4017.       <> 00h defined
  4018.         CL = NETBIOS name number
  4019.         DS:DX buffer filled with ASCIZ machine name
  4020. SeeAlso: AX=5E01h
  4021. ---------------------------------------------
  4022. INT 21 - DOS 3.1 + Microsoft Networks - SET MACHINE NAME
  4023.     AX = 5E01h
  4024.     CH = 00h undefine name
  4025.        <> 0  define name
  4026.     CL = name number
  4027.     DS:DX -> 15-character blank-padded ASCIZ name
  4028. SeeAlso: AX=5E00h
  4029. ---------------------------------------------
  4030. INT 21 - DOS 3.1 + Microsoft Networks - SET PRINTER SETUP
  4031.     AX = 5E02h
  4032.     BX = redirection list index
  4033.     CX = length of setup string (<= 64)
  4034.     DS:SI -> string buffer
  4035. Return: CF set on error
  4036.         AX = error code (01h) (see AH=59h)
  4037.     CF clear if successful
  4038. SeeAlso: AX=5E03h, INT 2F/AX=111Fh
  4039. ---------------------------------------------
  4040. INT 21 - DOS 3.1 + Microsoft Networks - GET PRINTER SETUP
  4041.     AX = 5E03h
  4042.     BX = redirection list index
  4043.     ES:DI -> string buffer
  4044. Return: CF set on error
  4045.         AX = error code (01h) (see AH=59h)
  4046.     CX = length of setup string (<= 64)
  4047. SeeAlso: AX=5E02h, INT 2F/AX=111Fh
  4048. ---------------------------------------------
  4049. INT 21 - DOS 3.1 + Microsoft Networks - SET PRINTER MODE
  4050.     AX = 5E04h
  4051.     BX = redirection list index
  4052.     DX = mode
  4053.         bit 0: set if binary, clear if text (tabs expanded to blanks)
  4054. Return: CF set on error
  4055.         AX = error code (see AH=59h)
  4056.     CF clear if successful
  4057. Note:    calls INT 2F/AX=111Fh with 5E04h on stack
  4058. SeeAlso: AX=5E05h, INT 2F/AX=111Fh
  4059. ---------------------------------------------
  4060. INT 21 - DOS 3.1 + Microsoft Networks - GET PRINTER MODE
  4061.     AX = 5E05h
  4062.     BX = redirection list index
  4063. Return: CF set on error
  4064.         AX = error code (see AH=59h)
  4065.     CF clear if successful
  4066.         DX = printer mode (see AX=5E04h)
  4067. Note:    calls INT 2F/AX=111Fh with 5E05h on stack
  4068. SeeAlso: AX=5E04h, INT 2F/AX=111Fh
  4069. ---------------------------------------------
  4070. INT 21 - DOS 3.1 + network - GET REDIRECTION MODE
  4071.     AX = 5F00h
  4072.     BL = redirection type
  4073.         03h printer
  4074.         04h disk drive
  4075. Return: CF set on error
  4076.         AX = error code (see AH=59h)
  4077.     CF clear if successful
  4078.         BH = redirection state
  4079.         00h off
  4080.         01h on
  4081. SeeAlso: AX=5F01h
  4082. ---------------------------------------------
  4083. INT 21 - DOS 3.1 + network - SET REDIRECTION MODE
  4084.     AX = 5F01h
  4085.     BL = redirection type
  4086.         03h printer
  4087.         04h disk drive
  4088.     BH = redirection state
  4089.         00h off
  4090.         01h on
  4091. Return: CF set on error
  4092.         AX = error code (see AH=59h)
  4093.     CF clear if successful
  4094. Note:    when redirection is off, the local device (if any) rather than the
  4095.       remote device is used
  4096. SeeAlso: AX=5F00h, INT 2F/AX=111Eh
  4097. ---------------------------------------------
  4098. INT 21 - DOS 3.1 + Microsoft Networks, VINES - GET REDIRECTION LIST ENTRY
  4099.     AX = 5F02h
  4100.     BX = redirection list index
  4101.     DS:SI -> 16 char local device name buffer
  4102.     ES:DI -> 128 char network name buffer
  4103. Return: CF set on error
  4104.         AX = error code (01h,12h) (see AH=59h)
  4105.     CF clear if successful
  4106.         BH = device status flag (bit 0 = 0 if valid)
  4107.         BL = device type (03h if printer, 04h if drive)
  4108.         CX = stored parameter value (user data)
  4109.         DS:SI and ES:DI buffers filled
  4110. Notes:    DX and BP are destroyed by this call!
  4111.     error code 12h is returned if BX is greater than the size of the list
  4112. SeeAlso: AX=5F03h, INT 2F/AX=111Eh
  4113. ---------------------------------------------
  4114. INT 21 - DOS 3.1 + Microsoft Networks, Banyan VINES - REDIRECT DEVICE
  4115.     AX = 5F03h
  4116.     BL = device type
  4117.         03h = printer device
  4118.         04h = file device
  4119.     CX = stored parameter value
  4120.     DS:SI -> ASCIZ source device name
  4121.     ES:DI -> destination ASCIZ network path + ASCIZ password
  4122. Return: CF set on error
  4123.         AX = error code (01h,03h,05h,08h,54h,55h,57h) (see AH=59h)
  4124.     CF clear if successful
  4125. SeeAlso: AX=5F02h,5F04h, INT 2F/AX=111Eh
  4126. ---------------------------------------------
  4127. INT 21 - DOS 3.1 + Microsoft Networks, Banyan VINES - CANCEL REDIRECTION
  4128.     AX = 5F04h
  4129.     DS:SI -> ASCIZ device name or network path
  4130. Return: CF set on error
  4131.         AX = error code (01h,0Fh,57h) (see AH=59h)
  4132.     CF clear if successful
  4133. SeeAlso: AX=5F03h, INT 2F/AX=111Eh
  4134. ---------------------------------------------
  4135. INT 21 - DOS 4.x + Microsoft Networks - GET REDIRECTION LIST EXTENDED ENTRY
  4136.     AX = 5F05h
  4137.     BX = redirection list index
  4138.     DS:SI -> buffer for ASCIZ source device name
  4139.     ES:DI -> buffer for destination ASCIZ network path
  4140. Return: CF set on error
  4141.         AX = error code (see AH=59h)
  4142.     CF clear if successful
  4143.         BH = device status flag (bit 0 clear if valid)
  4144.         BL = device type (03h if printer, 04h if drive)
  4145.         CX = stored parameter value (user data)
  4146.         BP = NETBIOS local session number
  4147.         DS:SI buffer filled
  4148.         ES:DI buffer filled
  4149. Notes:    the local session number allows sharing the redirector's session number
  4150.     if an error is caused on the NETBIOS LSN, the redirector may be unable
  4151.       to correctly recover from errors
  4152. SeeAlso: INT 2F/AX=111Eh
  4153. ---------------------------------------------
  4154. INT 21 - Network - GET REDIRECTION LIST???
  4155.     AX = 5F06h
  4156.     ???
  4157. Return: ???
  4158. Note:    appears to be similar to AX=5F02h and AX=5F05h
  4159. SeeAlso: AX=5F05h, INT 2F/AX=111Eh
  4160. ---------------------------------------------
  4161. INT 21 - LANtastic - GET LOGIN ENTRY
  4162.     AX = 5F80h
  4163.     BX = login entry index
  4164.     ES:DI -> 16-byte buffer for machine name
  4165. Return: CF clear if successful
  4166.         buffer filled with machine name ("\\" prefix removed)
  4167.     CF set on error
  4168.         AX = error code
  4169. ---------------------------------------------
  4170. INT 21 - LANtastic - LOGIN TO SERVER
  4171.     AX = 5F81h
  4172.     ES:DI -> ASCIZ login path followed immediately by ASCIZ password
  4173.     BL = adapater number
  4174.         FFh try all valid adapters
  4175.         00h-03h try only specified adapter
  4176. Return: CF clear if successful
  4177.     CF set on error
  4178.         AX = error code
  4179. Note:    login path is of form "\\machine\username"
  4180. SeeAlso: AX=5F82h
  4181. ---------------------------------------------
  4182. INT 21 - LANtastic - LOGOUT FROM SERVER
  4183.     AX = 5F82h
  4184.     ES:DI -> ASCIZ server name (in form "\\machine")
  4185. Return: CF clear if successful
  4186.     CF set on error
  4187.         AX = error code
  4188. SeeAlso: AX=5F81h
  4189. ---------------------------------------------
  4190. INT 21 - LANtastic - GET USERNAME ENTRY
  4191.     AX = 5F83h
  4192.     BX = login entry index
  4193.     ES:DI -> 16-byte buffer for username currently logged into
  4194. Return: CF clear if successful
  4195.     CF set on error
  4196.         AX = error code
  4197. ---------------------------------------------
  4198. INT 21 - LANtastic - GET INACTIVE SERVER ENTRY
  4199.     AX = 5F84h
  4200.     BX = server index not currently logged into
  4201.     ES:DI -> 16-byte buffer for server name which is available for logging
  4202.         in to ("\\" prefix omitted)
  4203. Return: CF clear if successful
  4204.         DL = adapter number to non-logged in server is on
  4205.     CF set on error
  4206.         AX = error code
  4207. ---------------------------------------------
  4208. INT 21 - LANtastic - CHANGE PASSWORD
  4209.     AX = 5F85h
  4210.     ES:DI -> buffer containing "\\machine\oldpassword" 00h "newpassword"00h
  4211. Return: CF clear if successful
  4212.     CF set on error
  4213.         AX = error code
  4214. Note:    must be logged into the named machine
  4215. ---------------------------------------------
  4216. INT 21 - LANtastic - DISABLE ACCOUNT
  4217.     AX = 5F86h
  4218.     ES:DI -> ASCIZ machine name in form "\\machine"
  4219. Return: CF clear if successful
  4220.     CF set on error
  4221.         AX = error code
  4222. Note:    must be logged into the named machine and concurrent logins set to 1
  4223.       by NET_MGR.  Requires system manager to re-enable account.
  4224. ---------------------------------------------
  4225. INT 21 - LANtastic - COPY FILE
  4226.     AX = 5F97h
  4227.     CX:DX = number of bytes to copy
  4228.     SI = source file handle
  4229.     DI = destination file handle
  4230. Return: CF clear if successful
  4231.         AX:DX = number of bytes copied
  4232.     CF set on error
  4233.         AX = error code
  4234. ---------------------------------------------
  4235. INT 21 - LANtastic - SEND UNSOLICITED MESSAGE
  4236.     AX = 5F98h
  4237.     DS:SI -> message buffer (see below)
  4238. Return: CF clear if successful
  4239.     CF set on error
  4240.         AX = error code
  4241. SeeAlso: AX=5F99h
  4242.  
  4243. Format of message buffer:
  4244. Offset    Size    Description
  4245.  00h    BYTE    reserved
  4246.  01h    BYTE    message type
  4247.         00h general 
  4248.         01h server warning
  4249.         02h-7Fh reserved
  4250.         80h-FFh user-defined
  4251.  02h 16 BYTEs    ASCIZ destination machine name
  4252.  12h 16 BYTEs    ASCIZ server name which user must be logged into
  4253.  22h 16 BYTEs    ASCIZ user name
  4254.  32h 16 BYTEs    ASCIZ originating machine name (filled in when received)
  4255.  42h 80 BYTEs    message text
  4256. ---------------------------------------------
  4257. INT 21 - LANtastic - GET LAST RECEIVED UNSOLICITED MESSAGE
  4258.     AX = 5F99h
  4259.     ES:DI -> messsage buffer (see AX=5F98h for format)
  4260. Return: CF clear if successful
  4261.     CF set on error
  4262.         AX = error code
  4263. SeeAlso: AX=5F98h
  4264. ---------------------------------------------
  4265. INT 21 - LANtastic - GET MESSAGE PROCESSING FLAG
  4266.     AX = 5F9Ah
  4267. Return: CF clear if successful
  4268.         DL = bits describing processing for received unsolicited messages
  4269.         bit 0: beep before message is delivered
  4270.             1: deliver message to message service
  4271.     CF set on error
  4272.         AX = error code
  4273. SeeAlso: AX=5F9Bh
  4274. ---------------------------------------------
  4275. INT 21 - LANtastic - SET MESSAGE PROCESSING FLAG
  4276.     AX = 5F9Bh
  4277.     DL = bits describing processing for received unsolicited messages
  4278.          (see AX=5F9Ah)
  4279. Return: CF clear if successful
  4280.     CF set on error
  4281.         AX = error code
  4282. SeeAlso: AX=5F9Ah
  4283. ---------------------------------------------
  4284. INT 21 - LANtastic - GET QUEUE ENTRY
  4285.     AX = 5FA0h
  4286.     BX = queue entry index (0000h is first entry)
  4287.     DS:SI -> buffer for queue entry (see below)
  4288.     ES:DI -> ASCIZ server name in form "\\name"
  4289. Return: CF clear if successful
  4290.     CF set on error
  4291.         AX = error code
  4292.     BX = entry index for next queue entry
  4293. SeeAlso: AX=5FA1h,5FA2h
  4294.  
  4295. Format of queue entry:
  4296. Offset    Size    Description
  4297.  00h    BYTE    status of entry
  4298.         00h empty
  4299.         01h being updated
  4300.         02h being held
  4301.         03h waiting for despool
  4302.         04h being despooled
  4303.         05h canceled
  4304.         06h spooled file could not be accessed
  4305.         07h destination could not be accessed
  4306.         08h rush job
  4307.  01h    DWORD    size of spooled file
  4308.  05h    BYTE    type of entry
  4309.         00h printer queue file
  4310.         01h message
  4311.         02h local file
  4312.         03h remote file
  4313.         04h to remote modem
  4314.         05h batch processor file
  4315.  06h    BYTE    control of despooled file
  4316.         bit 6: don't delete (for mail)
  4317.  07h    WORD    number of copies
  4318.  09h    DWORD    sequence number of queue entry
  4319.  0Dh 48 BYTEs    pathname of spooled file
  4320.  3Dh 16 BYTEs    user who spooled file
  4321.  4Dh 16 BYTEs    name of machine from which file was spooled
  4322.  5Dh    WORD    date file was spooled (see AX=5700h)
  4323.  5Fh    WORD    time file was spooled (see AX=5700h)
  4324.  61h 17 BYTEs    ASCIZ destination device or user name
  4325.  72h 48 BYTEs    comment field
  4326. ---------------------------------------------
  4327. INT 21 - LANtastic - SET QUEUE ENTRY
  4328.     AX = 5FA1h
  4329.     BX = handle of opened queue entry
  4330.     DS:SI -> queue entry (see AX=5FA0h)
  4331. Return: CF clear if successful
  4332.     CF set on error
  4333.         AX = error code
  4334. SeeAlso: AX=5FA0h,5FA2h
  4335. ---------------------------------------------
  4336. INT 21 - LANtastic - CONTROL QUEUE
  4337.     AX = 5FA2h
  4338.     BL = control command
  4339.         00h start despooling (privileged)
  4340.         01h halt despooling (privileged)
  4341.         02h halt despooling at end of job (privileged)
  4342.         03h pause despooler at end of job (privileged)
  4343.         04h print single job (privileged)
  4344.         05h restart current job (privileged)
  4345.         06h cancel the current job
  4346.         07h hold queue entry
  4347.         08h release a held queue entry
  4348.         09h make queue entry a rushed job (privileged)
  4349.     CX:DX = sequence number to control
  4350.     ES:DI -> ASCIZ computer name
  4351. Return: CF clear if successful
  4352.     CF set on error
  4353.         AX = error code
  4354. ---------------------------------------------
  4355. INT 21 - LANtastic - CREATE USER AUDIT ENTRY
  4356.     AX = 5FA7h
  4357.     DS:DX -> ASCIZ reason code (max 8 bytes)
  4358.     DS:SI -> ASCIZ variable reason code (max 128 bytes)
  4359.     ES:DI -> ASCIZ machine name in form "\\machine"
  4360. Return: CF clear if successful
  4361.     CF set on error
  4362.         AX = error code
  4363. ---------------------------------------------
  4364. INT 21 - LANtastic - GET ACTIVE USER INFORMATION
  4365.     AX = 5FB0h
  4366.     BX = server login entry index
  4367.     DS:SI -> buffer for active user entry (see below)
  4368.     ES:DI -> ASCIZ machine name in form "\\server"
  4369. Return: CF clear if successful
  4370.     CF set on error
  4371.         AX = error code
  4372.  
  4373. Format of active user entry:
  4374. Offset    Size    Description
  4375.  00h    WORD    virtual circuit number
  4376.  02h    BYTE    login state
  4377.         bit 0: fully logged in
  4378.             1: remote program load login
  4379.             3: user can create audit entries
  4380.             4: bypass mail protection
  4381.             5: treat as local process
  4382.             6: bypass queue protection
  4383.             7: bypass access control lists
  4384.  03h    BYTE    last command issued (see below)
  4385.  04h  5 BYTEs    number of I/O bytes (40-bit unsigned number)
  4386.  09h  3 BYTEs    number of server requests (24-bit unsigned)
  4387.  0Ch 16 BYTEs    name of user who is logged in
  4388.  1Ch 16 BYTEs    name of remote logged in machine
  4389.  
  4390. Values for last command:
  4391.  00h    login
  4392.  01h    process termination
  4393.  02h    open file
  4394.  03h    close file
  4395.  04h    create file
  4396.  05h    create new file
  4397.  06h    create unique file
  4398.  07h    commit data to disk
  4399.  08h    read file
  4400.  09h    write file
  4401.  0Ah    delete file
  4402.  0Bh    set file attributes
  4403.  0Ch    lock byte range
  4404.  0Dh    unlock byte range
  4405.  0Eh    create subdirectory
  4406.  0Fh    remove subdirectory
  4407.  10h    rename file
  4408.  11h    find first matching file
  4409.  12h    find next matching file
  4410.  13h    get disk free space
  4411.  14h    get a queue entry
  4412.  15h    set a queue entry
  4413.  16h    control the queue
  4414.  17h    return login information
  4415.  18h    return link description
  4416.  19h    seek on file
  4417.  1Ah    get server's time
  4418.  1Bh    create audit entry
  4419.  1Ch    open file in multitude of modes
  4420.  1Dh    change password
  4421.  1Eh    disable account
  4422.  1Fh    local server file copy
  4423. ---------------------------------------------
  4424. INT 21 - LANtastic - GET SHARED DIRECTORY INFORMATION
  4425.     AX = 5FB1h
  4426.     DS:SI -> 64-byte buffer for link description
  4427.     ES:DI -> ASCIZ machine and shared directory name in form
  4428.          "\\machine\shared-resource"
  4429. Return: CF clear if successful
  4430.         CX = access control list privilege bits for requesting user
  4431.         bit 5: allow attribute changing
  4432.             6: allow physical access to device
  4433.             7: allow program execution
  4434.             8: allow file renaming
  4435.             9: allow directory deletion
  4436.            10: allow file deletion
  4437.            11: allow file/directory lookups
  4438.            12: allow directory creation
  4439.            13: allow file creation
  4440.            14: allow open for write and writing
  4441.            15: allow open for read and reading
  4442.     CF set on error
  4443.         AX = error code
  4444. ---------------------------------------------
  4445. INT 21 - LANtastic - GET TIME FROM SERVER
  4446.     AX = 5FC0h
  4447.     DS:SI -> time block (see below)
  4448.     ES:DI -> ASCIZ server name to get time from
  4449. Return: CF clear if successful
  4450.     CF set on error
  4451.         AX = error code
  4452.  
  4453. Format of time block:
  4454. Offset    Size    Description
  4455.  00h    WORD    year
  4456.  02h    BYTE    day
  4457.  03h    BYTE    month
  4458.  04h    BYTE    minutes
  4459.  05h    BYTE    hour
  4460.  06h    BYTE    hundredths of second
  4461.  07h    BYTE    second
  4462. ---------------------------------------------
  4463. INT 21 - LANtastic - GET REDIRECTED PRINTER TIMEOUT
  4464.     AX = 5FD0h
  4465. Return: CF clear if successful
  4466.         CX = redirected printer timeout in clock ticks of 55ms
  4467.         0000h if timeout disabled
  4468.     CF set on error
  4469.         AX = error code
  4470. SeeAlso: AX=5FD1h
  4471. ---------------------------------------------
  4472. INT 21 - LANtastic - SET REDIRECTED PRINTER TIMEOUT
  4473.     AX = 5FD1h
  4474.     CX = printer timeout in clock ticks of 55ms, 0000h to disable timeouts
  4475. Return: CF clear if successful
  4476.     CF set on error
  4477.         AX = error code
  4478. SeeAlso: AX=5FD0h
  4479. ---------------------------------------------
  4480. INT 21 - LANtastic - GET DOS SERVICE VECTOR
  4481.     AX = 5FE0h
  4482. Return: CF clear if successful
  4483.         ES:BX -> current FAR service routine
  4484.     CF set on error
  4485.         AX = error code
  4486. SeeAlso: AX=5FE1h
  4487. ---------------------------------------------
  4488. INT 21 - LANtastic - SET DOS SERVICE VECTOR
  4489.     AX = 5FE1h
  4490.     ES:BX -> FAR routine to call for DOS service
  4491. Return: CF clear if successful
  4492.     CF set on error
  4493.         AX = error code
  4494. Note:    new handler must chain to previous handler as its first action
  4495. SeeAlso: AX=5FE0h
  4496. ---------------------------------------------
  4497. INT 21 - LANtastic - GET MESSAGE SERVICE VECTOR
  4498.     AX = 5FE2h
  4499. Return: CF clear if successful
  4500.         ES:BX -> current FAR message service routine
  4501.     CF set on error
  4502.         AX = error code
  4503. SeeAlso: AX=5FE3h
  4504. ---------------------------------------------
  4505. INT 21 - LANtastic - SET MESSAGE SERVICE VECTOR
  4506.     AX = 5FE3h
  4507.     ES:BX -> FAR routine for processing network messages
  4508. Return: CF clear if successful
  4509.     CF set on error
  4510.         AX = error code
  4511. Notes:    handler must chain to previous handler as its first action
  4512.     on invocation, ES:BX -> Network Control Block
  4513. SeeAlso: AX=5FE2h
  4514. ---------------------------------------------
  4515. INT 21 - DOS 3+ internal - RESOLVE PATH STRING TO CANONICAL PATH STRING
  4516.     AH = 60h
  4517.     DS:SI -> ASCIZ relative path string or directory name
  4518.     ES:DI -> 128-byte buffer for ASCIZ canonical fully qualified name
  4519. Return: CF set on error
  4520.         AX = error code 
  4521.         02h invalid source name
  4522.         03h invalid drive or malformed path
  4523.         others???
  4524.     CF clear if successful
  4525.         AH = 00h
  4526.         AL = destroyed (00h or 5Ch or last char of current dir on drive)
  4527.         buffer filled with qualified name of form D:\PATH\FILE.EXT or
  4528.           \\MACHINE\PATH\FILE.EXT
  4529. Notes:    the input path need not actually exist
  4530.     letters are uppercased, forward slashes converted to backslashes,
  4531.       asterisks converted to appropriate number of question marks, and
  4532.       file and directory names are truncated to 8.3 if necessary.
  4533.     '.' and '..' in the path are resolved
  4534.     filespecs on local drives always start with "d:", those on network
  4535.       drives always start with "\\"
  4536.     if path string is on a JOINed drive, the returned name is the one that
  4537.       would be needed if the drive were not JOINed; similarly for a
  4538.       SUBSTed, ASSIGNed, or network drive letter.    Because of this, it is
  4539.       possible to get a qualified name that is not legal under the current
  4540.       combination of SUBSTs, ASSIGNs, JOINs, and network redirections
  4541.     functions which take pathnames require canonical paths if invoked via
  4542.       INT 21/AX=5D00h
  4543.     supported by OS/2 v1.1 compatibility box
  4544. SeeAlso: INT 2F/AX=1123h,1221h
  4545. ---------------------------------------------
  4546. INT 21 - DOS 3+ internal - UNUSED
  4547.     AH = 61h
  4548. Return: AL = 00h
  4549. ---------------------------------------------
  4550. INT 21 - DOS 3+ - GET PSP ADDRESS
  4551.     AH = 62h
  4552. Return: BX = current PSP segment address (see AH=26h for format)
  4553. Notes:    under DOS 3+, this function does not use any of the DOS-internal stacks
  4554.       and is thus fully reentrant
  4555.     identical to the undocumented AH=51h
  4556. SeeAlso: AH=50h, AH=51h
  4557. ---------------------------------------------
  4558. INT 21 - DOS 2.25 only - GET LEAD BYTE TABLE (2-BYTE CHARACTER SUPPORT)
  4559.     AH = 63h
  4560.     AL = subfunction
  4561.          00h get system lead byte table
  4562.         Return:    DS:SI -> lead byte table
  4563.          01h set/clear interim console flag (determine whether interim
  4564.             bytes are returned on some console functions)
  4565.         DL = 01h/00h to set/clear interim console flag
  4566.          02h get interim console flag
  4567.         Return:    DL = interim console flag
  4568. Return: CF set on error
  4569.         AX = error code (01h) (see AH=59h)
  4570.     CF clear if successful
  4571. Note:    does not preserve any registers other than SS:SP
  4572. ---------------------------------------------
  4573. INT 21 - Asian DOS 3.2+ only - GET DOUBLE BYTE CHARACTER SET LEAD TABLE
  4574.     AX = 6300h
  4575. Return: AL = error code
  4576.         00h successful
  4577.         DS:SI -> DBCS table (see below)
  4578.         BX, CX, DX, BP, DI, and ES destroyed
  4579.         FFh not supported
  4580. Notes:    probably identical to AX=6300h for DOS 2.25
  4581.     The US version of DOS 4.0 accepts this function, but returns an empty
  4582.       list
  4583.  
  4584. Format of DBCS table:
  4585. Offset    Size    Description
  4586.  00h  2 BYTEs    low/high ends of a range of leading byte of double-byte chars
  4587.  02h  2 BYTEs    low/high ends of a range of leading byte of double-byte chars
  4588.     ...
  4589.   N   2 BYTEs    00h,00h end flag
  4590. ---------------------------------------------
  4591. INT 21 - Asian DOS 3.2+ only - SET KOREAN (HONGEUL) INPUT MODE
  4592.     AX = 6301h
  4593.     DL = new mode
  4594.         00h return only full characters on DOS keyboard input functions
  4595.         01h    return partially-formed characters also
  4596. Return: AL = status
  4597.         00h successful
  4598.         FFh invalid mode
  4599. SeeAlso: AX=6302h
  4600. ---------------------------------------------
  4601. INT 21 - Asian DOS 3.2+ only - GET KOREAN (HONGEUL) INPUT MODE
  4602.     AX = 6302h
  4603. Return: AL = status
  4604.         00h successful
  4605.         DL = current input mode
  4606.             00h return only full characters
  4607.             01h return partial characters
  4608.         FFh not supported
  4609. SeeAlso: AX=6301h
  4610. ---------------------------------------------
  4611. INT 21 - DOS 3.2 internal - GET/SET ???
  4612.     AH = 64h
  4613.     AL = subfunction
  4614.         00h get ???
  4615.         Return: DL = ???
  4616.         01h set ???
  4617.         DL = ???
  4618.         02h get and set ???
  4619.         DL = new ???
  4620.         Return: DL = old ???
  4621. ---------------------------------------------
  4622. INT 21 - DOS 3.3+ internal - SET ???
  4623.     AH = 64h
  4624.     AL = flag
  4625.         00h  ??? 
  4626.         nonzero  ??? 
  4627. Return: nothing
  4628. Notes:    affects operation of AH=08h
  4629.     called by DOS 3.3+ PRINT.COM
  4630. ---------------------------------------------
  4631. INT 21 - DOS 3.3+ - GET EXTENDED COUNTRY INFORMATION
  4632.     AH = 65h
  4633.     AL = info ID
  4634.         01h get general internationalization info
  4635.         02h get pointer to uppercase table
  4636.         04h get pointer to filename uppercase table
  4637.         05h (DOS 3.3+ internal) get pointer to filename terminator table
  4638.         06h get pointer to collating sequence table
  4639.         07h (DOS 4.x) get pointer to Double-Byte Character Set table
  4640.     BX = code page (-1=global code page)
  4641.     DX = country ID (-1=current country)
  4642.     ES:DI -> country information buffer (see below)
  4643.     CX = size of buffer (>= 5)
  4644. Return: CF set on error
  4645.         AX = error code (see AH=59h)
  4646.     CF clear if succesful
  4647.         CX = size of country information returned
  4648.         ES:DI -> country information
  4649. Notes:    AL=05h appears to return same info for all countries and codepages
  4650.     NLSFUNC must be installed to get info for countries other than the
  4651.       default
  4652. SeeAlso: AH=38h,INT 2F/AX=1401h,1402h
  4653.  
  4654. Format of country information:
  4655. Offset    Size    Description
  4656.  00h    BYTE    info ID
  4657. ---if info ID = 01h---
  4658.  01h    WORD    size
  4659.  03h    WORD    country ID
  4660.  05h    WORD    code page
  4661.  07h 34 BYTEs    country-dependent info (see AH=38h)
  4662. ---if info ID = 02h---
  4663.  01h    DWORD    pointer to uppercase table (see below)
  4664. ---if info ID = 04h---
  4665.  01h    DWORD    pointer to collating table (see below)
  4666. ---if info ID = 05h---
  4667.  01h    DWORD    pointer to filename character table (see below)
  4668. ---if info ID = 06h---
  4669.  01h    DWORD    pointer to filename uppercase table (see below)
  4670. ---if info ID = 07h (DOS 4.x)---
  4671.  01h    DWORD    pointer to DBCS lead byte table (see below)
  4672.  
  4673. Format of uppercase table:
  4674. Offset    Size    Description
  4675.  00h    WORD    table size
  4676.  02h 128 BYTEs    uppercase equivalents (if any) of chars 80h to FFh
  4677.  
  4678. Format of collating table:
  4679. Offset    Size    Description
  4680.  00h    WORD    table size
  4681.  02h 256 BYTEs    values used to sort characters 00h to FFh
  4682.  
  4683. Format of filename terminator table:
  4684. Offset    Size    Description
  4685.  00h    WORD    table size
  4686.  02h  7 BYTEs    ???  (01h 00h FFh 00h 00h 20h 02h in MSDOS 3.30)
  4687.  09h    BYTE    length of following data
  4688.  0Ah  N BYTES    characters which terminate a filename:    ."/\[]:|<>+=;,
  4689.  
  4690. Format of filename uppercase table:
  4691. Offset    Size    Description
  4692.  00h    WORD    table size
  4693.  02h 128 BYTEs    uppercase equivalents (if any) of chars 80h to FFh
  4694.  
  4695. Format of DBCS lead byte table:
  4696. Offset    Size    Description
  4697.  00h    WORD    length
  4698.  02h 2N BYTEs    start/end for N lead byte ranges
  4699.     WORD    0000h    (end of table)
  4700. ---------------------------------------------
  4701. INT 21 - DOS 4.x internal - COUNTRY-DEPENDENT CHARACTER CAPITALIZATION
  4702.     AH = 65h
  4703.     AL = function
  4704.         20h capitalize character
  4705.         DL = character to capitalize
  4706.         Return: DL = capitalized character
  4707.         21h capitalize string
  4708.         DS:DX -> string to capitalize
  4709.         CX = length of string
  4710.         22h capitalize ASCIZ string
  4711.         DS:DX -> ASCIZ string to capitalize
  4712. Return: CF set on error
  4713.         AX = error code (see AH=59h)
  4714.     CF clear if successful
  4715. ---------------------------------------------
  4716. INT 21 - DOS 4.x internal - DETERMINE IF CHARACTER REPRESENTS YES/NO RESPONSE
  4717.     AX = 6523h
  4718.     DL = character
  4719.     DH = second character of double-byte character (if applicable)
  4720. Return: CF set on error
  4721.     CF clear if successful
  4722.         AX = type
  4723.         00h no
  4724.         01h yes
  4725.         02h neither yes nor no
  4726. ---------------------------------------------
  4727. INT 21 - DOS 4.x internal - COUNTRY-DEPENDENT FILENAME CAPITALIZATION
  4728.     AH = 65h
  4729.     AL = function
  4730.         A0h capitalize filename character
  4731.         DL = character to capitalize
  4732.         Return: DL = capitalized character
  4733.         A1h capitalize counted filename string
  4734.         DS:DX -> filename string to capitalize
  4735.         CX = length of string
  4736.         A2h capitalize ASCIZ filename
  4737.         DS:DX -> ASCIZ filename to capitalize
  4738. Return: CF set on error
  4739.         AX = error code (see AH=59h)
  4740.     CF clear if successful
  4741. Note:    nonfunctional in DOS 4.00 and 4.01 due to a bug
  4742. ---------------------------------------------
  4743. INT 21 - DOS 3.3+ - GET GLOBAL CODE PAGE TABLE
  4744.     AX = 6601h
  4745. Return: CF set on error
  4746.         AX = error code (see AH=59h)
  4747.     CF clear if successful
  4748.         BX = active code page
  4749.         DX = system code page
  4750. SeeAlso: AX=6602h
  4751. ---------------------------------------------
  4752. INT 21 - DOS 3.3+ - SET GLOBAL CODE PAGE TABLE
  4753.     AX = 6602h
  4754.     BX = active code page
  4755.         437  US
  4756.         850  Multilingual
  4757.         860  Portugal
  4758.         863  Canada (French)
  4759.         865  Norway/Denmark
  4760.     DX = system code page (active page at boot time)
  4761. Return: CF set on error
  4762.         AX = error code (see AH=59h)
  4763.     CF clear if successful
  4764. SeeAlso: AX=6601h
  4765. ---------------------------------------------
  4766. INT 21 - DOS 3.3+ - SET HANDLE COUNT
  4767.     AH = 67h
  4768.     BX = desired number of handles (max 255)
  4769. Return: CF set if error (and error code in AX)
  4770. Notes:    if BX <= 20, no action is taken
  4771.     only the first 20 handles are copied to child processes in DOS 3.3
  4772.     a bug in DOS 3.30 results in requests for an even number of handles
  4773.       allocating a full 64K for the handle table
  4774. SeeAlso: AH=26h
  4775. ---------------------------------------------
  4776. INT 21 - DOS 3.3+ - COMMIT FILE, WRITE ALL BUFFERED DATA TO DISK
  4777.     AH = 68h
  4778.     BX = file handle
  4779. Return: CF set on error 
  4780.         AX = error code (see AH=59h)
  4781.     CF clear if successful
  4782. SeeAlso: AX=5D01h, INT 2F/AX=1107h
  4783. ---------------------------------------------
  4784. INT 21 - DOS 4.0 internal - GET/SET DISK SERIAL NUMBER
  4785.     AH = 69h
  4786.     AL = subfunction
  4787.         00h    get serial number
  4788.         01h set serial number
  4789.     BL = drive (0=default, 1=A, 2=B, etc)
  4790.     DS:DX -> disk info (see below)
  4791. Return: CF set on error
  4792.         AX = error code (see AH=59h)
  4793.     CF clear if successful
  4794.         AX destroyed
  4795.         (AL = 00h) buffer filled with appropriate values from extended BPB
  4796.         (AL = 01h) extended BPB on disk set to values from buffer
  4797. Notes:    does not generate a critical error; all errors are returned in AX
  4798.     error 0005h given if no extended BPB on disk
  4799.     does not work on network drives (error 0001h)
  4800.     buffer after first two bytes is exact copy of bytes 27h thru 3Dh of
  4801.        extended BPB on disk
  4802.  
  4803. Format of disk info:
  4804. Offset    Size    Description
  4805.  00h    WORD    info level (zero)
  4806.  02h    DWORD    disk serial number (binary)
  4807.  06h 11 BYTEs    volume label or "NO NAME    " if none present
  4808.  11h  8 BYTEs    (AL=00h only) filesystem type--string "FAT12   " or "FAT16   "
  4809. ---------------------------------------------
  4810. INT 21 - DOS 4.0 internal - ???
  4811.     AH = 6Ah
  4812.     ???
  4813. Return: ???
  4814. ---------------------------------------------
  4815. INT 21 - DOS 4.0 internal - ???
  4816.     AH = 6Bh
  4817.     AL = subfunction
  4818.         00h ???
  4819.         DS:SI -> Current Directory Structure???
  4820.         CL = drive (1=A:)
  4821.         01h ???
  4822.         DS:SI -> ???
  4823.         CL = file handle???
  4824.         02h ???
  4825.         DS:SI -> Current Directory Structure???
  4826.         DI = ???
  4827.         CX = drive (1=A:)
  4828.     ???
  4829. Return: CF set on error
  4830.         AX = error code (see INT 21/AH=59h)
  4831.     CF clear if successful
  4832. Return: ???
  4833. Note:    passed through to INT 2F/AX=112Fh with AX on top of stack
  4834. SeeAlso: INT 2F/AX=112Fh
  4835. ---------------------------------------------
  4836. INT 21 - DOS 4.0 - EXTENDED OPEN/CREATE
  4837.     AX = 6C00h
  4838.     BL = open mode as in AL for normal open (INT 21h/AH=3Dh)
  4839.         bit 7: inheritance
  4840.         bits 4-6: sharing mode
  4841.         bit 3 reserved
  4842.         bits 0-2: access mode
  4843.     BH = flags
  4844.         bit 6 = auto commit on write
  4845.         bit 5 = return error rather than doing INT 24h
  4846.     CX = create attribute
  4847.         bits 6-15 reserved
  4848.         bit 5: archive
  4849.         bit 4: reserved
  4850.         bit 3: volume label
  4851.         bit 2: system
  4852.         bit 1: hidden
  4853.         bit 0: readonly
  4854.     DL = action if file exists/does not exists
  4855.         bits 7-4 action if file does not exist
  4856.             0000 fail
  4857.             0001 create
  4858.         bits 3-0 action if file exists
  4859.             0000 fail
  4860.             0001 open
  4861.             0010 replace/open
  4862.     DH = 00h (reserved)
  4863.     DS:SI -> ASCIZ file name
  4864. Return: CF set on error
  4865.        AX = error code (see AH=59h)
  4866.     CF clear if successful
  4867.        AX = file handle
  4868.        CX = 1 file opened
  4869.         2 file created
  4870.         3 file replaced
  4871. Note:    the PC LAN Program only supports DL=01h, DL=10h/sharing=compatibility,
  4872.       and DL=12h
  4873. SeeAlso: AH=3Ch,3Dh
  4874. ---------------------------------------------
  4875. INT 21 - ???
  4876.     AH = 89h
  4877.     ???
  4878. Note:    reportedly called by Microsoft C 4.0 startup code
  4879. ---------------------------------------------
  4880. INT 21 - Novell NetWare SFT Level II - EXTENDED FILE ATTRIBUTES
  4881.     AH = B6h
  4882.     AL = subfunction
  4883.         00h get extended file attributes
  4884.         01h set extended file attributes
  4885.     CL = attributes
  4886.         bit 4: transaction tracking file
  4887.         5: indexing file (to be implemented)
  4888.         6: read audit (to be implemented)
  4889.         7: write audit (to be implemented)
  4890.     DS:DX -> ASCIZ pathname
  4891. Return: CF set on error
  4892.         AL = error code
  4893.         FFh file not found
  4894.         8Ch caller lacks privileges
  4895.     CL = current extended file attributes
  4896. SeeAlso: AX=4300h
  4897. ---------------------------------------------
  4898. INT 21 - Novell Advanced NetWare 2.0+ - PRINT JOBS
  4899.     AH = B8h
  4900.     AL = subfunction
  4901.         00h get default print job flags
  4902.         01h set default capture flags
  4903.         02h get specific capture flags
  4904.         03h set specific print job flags
  4905.         04h get default local printer
  4906.         05h set default local printer
  4907.         06h set capture print queue
  4908.         07h set capture print job
  4909.         08h get banner user name
  4910.         09h set banner user name
  4911.     CX = buffer size
  4912.     ES:BX -> buffer
  4913. Return: none
  4914. ---------------------------------------------
  4915. INT 21 - Novell NetWare 4.0 - SET END OF JOB STATUS
  4916.     AH = BBh
  4917.     AL = new EOJ flag
  4918.         00h disable EOJs
  4919.         otherwise enable EOJs
  4920. Return: AL = old EOJ flag
  4921. SeeAlso: AH=D6h
  4922. ---------------------------------------------
  4923. INT 21 - Novell NetWare 4.6 - LOG/LOCK PHYSICAL RECORD
  4924.     AH = BCh
  4925.     AL = flags
  4926.         bit 0: lock as well as log record
  4927.         1: non-exclusive lock
  4928.     BX = file handle
  4929.     CX:DX = offset
  4930.     BP = timeout in timer ticks (1/18 sec)
  4931.     SI:DI = length
  4932. Return: AL = error code
  4933. SeeAlso: AH=BFh
  4934. ---------------------------------------------
  4935. INT 21 - Novell NetWare 4.6 - RELEASE PHYSICAL RECORD
  4936.     AH = BDh
  4937.     BX = file handle
  4938.     CX:DX = offset
  4939. Return: AL = error code
  4940. SeeAlso: AH=C0h
  4941. ---------------------------------------------
  4942. INT 21 - Novell NetWare 4.6 - CLEAR PHYSICAL RECORD
  4943.     AH = BEh
  4944.     BX = file handle
  4945.     CX:DX = offset
  4946. Return: AL = error code
  4947. SeeAlso: AH=C1h
  4948. ---------------------------------------------
  4949. INT 21 - Novell NetWare 4.6 - LOG/LOCK RECORD (FCB)
  4950.     AH = BFh
  4951.     AL = flags
  4952.         bit 0: lock as well as log record
  4953.         1: non-exclusive lock
  4954.     DS:DX -> FCB
  4955.     BX:CX = offset
  4956.     BP = timeout in timer ticks (1/18 sec)
  4957.     SI:DI = length
  4958. Return: AL = error code
  4959. SeeAlso: AH=BCh,C2h
  4960. ---------------------------------------------
  4961. INT 21 - Novell NetWare 4.6 - RELEASE RECORD (FCB)
  4962.     AH = C0h
  4963.     DS:DX -> FCB
  4964.     BX:CX = offset
  4965. Return: AL = error code
  4966. SeeAlso: AH=BDh,C3h
  4967. ---------------------------------------------
  4968. INT 21 - Novell NetWare 4.6 - CLEAR RECORD (FCB)
  4969.     AH = C1h
  4970.     DS:DX -> FCB
  4971.     BX:CX = offset
  4972. Return: AL = error code
  4973. SeeAlso: AH=BEh,C4h
  4974. ---------------------------------------------
  4975. INT 21 - Novell NetWare 4.6 - LOCK PHYSICAL RECORD SET
  4976.     AH = C2h
  4977.     AL = flags
  4978.         bit 1: non-exclusive lock
  4979.     BP = timeout in timer ticks (1/18 sec)
  4980. Return: AL = error code
  4981. SeeAlso: AH=BFh
  4982. ---------------------------------------------
  4983. INT 21 - Novell NetWare 4.6 - RELEASE PHYSICAL RECORD SET
  4984.     AH = C3h
  4985. Return: AL = error code
  4986. SeeAlso: AH=C0h
  4987. ---------------------------------------------
  4988. INT 21 - Novell NetWare 4.6 - CLEAR PHYSICAL RECORD SET
  4989.     AH = C4h
  4990. Return: AL = error code
  4991. SeeAlso: AH=C1h
  4992. ---------------------------------------------
  4993. INT 21 - Novell NetWare 4.6 - SEMAPHORES
  4994.     AH = C5h
  4995.     AL = subfunction
  4996.         00h open semaphore
  4997.         DS:DX -> semaphore name
  4998.         CL = initial value
  4999.         01h examine semaphore
  5000.         Return: CX = semaphore value (sign extended)
  5001.             DL = open count
  5002.         02h wait on semaphore
  5003.         BP = timeout in timer ticks (1/18 sec)
  5004.         03h signal semaphore
  5005.         04h close semaphore
  5006.     CX:DX = semaphore handle (except function 00h)
  5007. Return: AL = error code
  5008.     if function 00h
  5009.        CX:DX = semaphore handle
  5010.        BL = open count
  5011. ---------------------------------------------
  5012. INT 21 - Novell NetWare 4.6 - GET OR SET LOCK MODE
  5013.     AH = C6h
  5014.     AL = subfunction
  5015.         00h set old "compatibility" mode
  5016.         01h set new extended locks mode 
  5017.         02h get lock mode
  5018. Return: AL = current lock mode
  5019. ---------------------------------------------
  5020. INT 21 - Novell NetWare 4.0 - TTS
  5021.     AH = C7h
  5022.     AL = subfunction
  5023.         00h begin transaction (NetWare SFT level II)
  5024.         Return: AL = error code
  5025.         01h end transaction (NetWare SFT level II)
  5026.         Return: AL = error code
  5027.             CX:DX = transaction reference number
  5028.         02h TTS available (NetWare SFT level II)
  5029.         Return: AL = completion code
  5030.                 00h TTS not available
  5031.                 01h TTS available
  5032.                 FDh TTS available but disabled
  5033.         03h abort transaction (NetWare SFT level II)
  5034.         Return: AL = error code
  5035.         04h transaction status
  5036.         05h get application thresholds
  5037.         06h set application thresholds
  5038.         07h get workstation thresholds
  5039.         08h set workstation thresholds
  5040. Return: ???
  5041. ---------------------------------------------
  5042. INT 21 - Novell NetWare 4.0 - BEGIN LOGICAL FILE LOCKING
  5043.     AH = C8h
  5044.     if function C6h lock mode 00h:
  5045.         DL = mode
  5046.         00h no wait
  5047.         01h wait
  5048.     if function C6h lock mode 01h:
  5049.         BP = timeout in timer ticks (1/18 sec)
  5050. Return: AL = error code
  5051. SeeAlso: AH=C9h
  5052. ---------------------------------------------
  5053. INT 21 - Novell NetWare 4.0 - END LOGICAL FILE LOCKING
  5054.     AH = C9h
  5055. Return: AL = error code
  5056. SeeAlso: AH=C8h
  5057. ---------------------------------------------
  5058. INT 21 - Novell NetWare 4.0 - LOG/LOCK PERSONAL FILE (FCB)
  5059.     AH = CAh
  5060.     DS:DX -> FCB
  5061.     if function C6h lock mode 01h:
  5062.         AL = log and lock flag
  5063.         00h log file only
  5064.         01h lock as well as log file
  5065.         BP = timeout in timer ticks (1/18 sec)
  5066. Return: AL = error code
  5067. SeeAlso: AH=CBh
  5068. ---------------------------------------------
  5069. INT 21 - Novell NetWare 4.0 - LOCK FILE SET
  5070.     AH = CBh
  5071.     if function C6h lock mode 00h:
  5072.         DL = mode
  5073.         00h no wait
  5074.         01h wait
  5075.     if function C6h lock mode 01h:
  5076.         BP = timeout in timer ticks (1/18 sec)
  5077. Return: AL = error code
  5078. SeeAlso: AH=CAh
  5079. ---------------------------------------------
  5080. INT 21 - Novell NetWare 4.0 - RELEASE FILE (FCB)
  5081.     AH = CCh
  5082.     DS:DX -> FCB
  5083. Return: none
  5084. SeeAlso: AH=CDh
  5085. ---------------------------------------------
  5086. INT 21 - Novell NetWare 4.0 - RELEASE FILE SET
  5087.     AH = CDh
  5088. Return: none
  5089. SeeAlso: AH=CCh
  5090. ---------------------------------------------
  5091. INT 21 - Novell NetWare 4.0 - CLEAR FILE (FCB)
  5092.     AH = CEh
  5093.     DS:DX -> FCB
  5094. Return: AL = error code
  5095. SeeAlso: AH=CFh
  5096. ---------------------------------------------
  5097. INT 21 - Novell NetWare 4.0 - CLEAR FILE SET
  5098.     AH = CFh
  5099. Return: AL = 00h
  5100. SeeAlso: AH=CEh
  5101. ---------------------------------------------
  5102. INT 21 - Novell NetWare 4.6, Banyan VINES - LOCK LOGICAL RECORD
  5103.     AH = D0h
  5104.     DS:DX -> record string
  5105.     if function C6h lock mode 01h: (Novell only)
  5106.         AL = flags
  5107.         bit 0: lock as well as log the record
  5108.         bit 1: non-exclusive lock
  5109.         BP = timeout in timer ticks (1/18 sec)
  5110. Return: AL = error code
  5111.         00h successful
  5112.         FFh unsuccessful
  5113. SeeAlso: AH=D1h,D2h
  5114. ---------------------------------------------
  5115. INT 21 - Novell NetWare 4.6, Banyan VINES - LOCK LOGICAL RECORD SET
  5116.     AH = D1h
  5117.     if function C6h lock mode 00h:
  5118.         DL = mode
  5119.         00h no wait
  5120.         01h wait
  5121.     if function C6h lock mode 01h: (Novell only)
  5122.        BP = timeout in timer ticks (1/18 sec)
  5123. Return: AL = error code (see AH=D0h)
  5124. SeeAlso: AH=D0h,D3h
  5125. ---------------------------------------------
  5126. INT 21 - Novell NetWare 4.0, Banyan VINES - UNLOCK LOGICAL RECORD
  5127.     AH = D2h
  5128.     DS:DX -> semaphore identifier (counted string up to 100 chars long)
  5129. Return: AL = error code (see AH=D0h)
  5130. SeeAlso: AH=D0h,D3h
  5131. ---------------------------------------------
  5132. INT 21 - Novell NetWare 4.0, Banyan VINES - UNLOCK LOGICAL RECORD SET
  5133.     AH = D3h
  5134. Return: AL = error code (see AH=D0h)
  5135. Note:    unlocks all semaphores logged in the semaphore set of the requesting PC
  5136. SeeAlso: AH=D1h,D2h
  5137. ---------------------------------------------
  5138. INT 21 - Novell NetWare 4.0, Banyan VINES - CLEAR LOGICAL RECORD
  5139.     AH = D4h
  5140.     DS:DX -> semaphore identifier (counted string up to 100 chars long)
  5141. Return: AL = error code
  5142.         00h successful
  5143.         FFh not successful
  5144. SeeAlso: AH=D5h
  5145. ---------------------------------------------
  5146. INT 21 - Novell NetWare 4.0, Banyan VINES - CLEAR LOGICAL RECORD SET
  5147.     AH = D5h
  5148. Return: AL = error code (see AH=D4h)
  5149. Note:    unlocks and clears all semaphores associated with the semaphore set
  5150.       of the requesting PC
  5151. SeeAlso: AH=D4h
  5152. ---------------------------------------------
  5153. INT 21 - Novell NetWare 4.0 - END OF JOB
  5154.     AH = D6h
  5155. Return: AL = error code
  5156. SeeAlso: AH=BBh
  5157. ---------------------------------------------
  5158. INT 21 - Novell NetWare 4.0 - SYSTEM LOGOUT
  5159.     AH = D7h
  5160. Return: AL = error code
  5161. ---------------------------------------------
  5162. INT 21 - Novell NetWare, Banyan VINES - ALLOCATE RESOURCE
  5163.     AH = D8h
  5164.     DL = resource number
  5165. Return: AL = status
  5166.         00h successful
  5167.         FFh unsucessful
  5168. SeeAlso: AH=D9h
  5169. ---------------------------------------------
  5170. INT 21 - Novell NetWare, Banyan VINES - DEALLOCATE RESOURCE
  5171.     AH = D9h
  5172.     DL = resource number
  5173. Return:    AL = status (see AH=D8h)
  5174. SeeAlso: AH=D8h
  5175. ---------------------------------------------
  5176. INT 21 - Novell NetWare 4.0 - GET VOLUME STATISTICS
  5177.     AH = DAh
  5178.     DL = volume number
  5179.     ES:DI -> reply buffer (see below)
  5180. Return: AL = 00h
  5181. SeeAlso: AH=36h
  5182.  
  5183. Format of reply buffer:
  5184. Offset    Size    Description
  5185.  00h    WORD    sectors/block
  5186.  02h    WORD    total blocks
  5187.  04h    WORD    unused blocks
  5188.  06h    WORD    total directory entries
  5189.  08h    WORD    unused directory entries
  5190.  0Ah 16 BYTEs    volume name, null padded
  5191.  1Ah    WORD    removable flag, 0000h = not removable
  5192. ---------------------------------------------
  5193. INT 21 - Novell NetWare 4.0 - GET NUMBER OF LOCAL DRIVES
  5194.     AH = DBh
  5195. Return: AL = number of local disks
  5196. SeeAlso: AH=0Eh
  5197. ---------------------------------------------
  5198. INT 21 - Novell NetWare 4.0, Banyan VINES - GET STATION NUMBER
  5199.     AH = DCh
  5200. Return: AL = station number
  5201.         00h if NetWare not loaded or this machine is a non-dedicated server
  5202.     CX = station number in ASCII
  5203. Note:    station number only unique for those PCs connected to same semaphore
  5204.       service
  5205. ---------------------------------------------
  5206. INT 21 - PCMag PCMANAGE/DCOMPRES - TURN ON/OFF
  5207.     AH = DCh
  5208.     DX = state
  5209.         0000h turn on
  5210.         0001h turn off
  5211. SeeAlso: AX=FEDCh
  5212. ---------------------------------------------
  5213. INT 21 - Novell NetWare 4.0 - SET ERROR MODE
  5214.     AH = DDh
  5215.     DL = error mode
  5216.         00h display critical I/O errors
  5217.         01h extended errors for all I/O in AL
  5218.         02h extended errors for critical I/O in AL
  5219. Return: AL = previous error mode
  5220. ---------------------------------------------
  5221. INT 21 - Novell NetWare 4.0 - SET BROADCAST MODE
  5222.     AH = DEh
  5223.     AL = broadcast mode
  5224.         00h receive console and workstation broadcasts
  5225.         01h receive console broadcasts only
  5226.         02h receive no broadcasts
  5227.         03h store all broadcasts for retrieval
  5228.         04h get broadcast mode
  5229.         05h disable shell timer interrupt checks
  5230.         06h enable shell timer interrupt checks
  5231. Return: AL = old broadcast mode
  5232. ---------------------------------------------
  5233. INT 21 - Novell NetWare 4.0 - CAPTURE
  5234.     AH = DFh
  5235.     AL = subfunction
  5236.         00h start LPT capture
  5237.         01h end LPT capture
  5238.         02h cancel LPT capture
  5239.         03h flush LPT capture
  5240.         04h start specific capture
  5241.         05h end specific capture
  5242.         06h cancel specific capture
  5243.         07h flush specific capture
  5244. Return: AL = error code
  5245. ---------------------------------------------
  5246. INT 21 - Novell NetWare 4.0 - PRINT SPOOLING
  5247.     AH = E0h
  5248.     DS:SI -> request buffer
  5249.     ES:DI -> reply buffer
  5250.     subfunction in third byte of request buffer
  5251.         00h spool data to a capture file
  5252.         01h close and queue capture file
  5253.         02h set spool flags
  5254.         03h spool existing file
  5255.         04h get spool queue entry
  5256.         05h remove entry from spool queue
  5257.         06h get printer status
  5258.         09h create a disk capture file
  5259. Return: AL = error code
  5260. ---------------------------------------------
  5261. INT 21 - OS/286, OS/386 - INITIALIZE REAL PROCEDURE
  5262.     AH = E0h
  5263.     ???
  5264. Return: ???
  5265. ---------------------------------------------
  5266. INT 21 - Novell NetWare 4.0 - BROADCAST MESSAGES
  5267.     AH = E1h
  5268.     DS:SI -> request buffer
  5269.     ES:DI -> reply buffer
  5270.     subfunction in third byte of request buffer
  5271.         00h send broadcast message
  5272.         01h get broadcase message
  5273.         02h disable station broadcasts
  5274.         03h enable station broadcasts
  5275.         04h send personal message
  5276.         05h get personal message
  5277.         06h open message pipe
  5278.         07h close message pipe
  5279.         08h check pipe status
  5280.         09h broadcast to console
  5281. Return: AL = error code
  5282. ---------------------------------------------
  5283. INT 21 - OS/286, OS/386 - ISSUE REAL PROCEDURE CALL
  5284.     AH = E1h
  5285.     ???
  5286. Return: ???
  5287. Note:    protected mode only???
  5288. ---------------------------------------------
  5289. INT 21 - Novell NetWare 4.0 - DIRECTORY FUNCTIONS
  5290.     AH = E2h
  5291.     DS:SI -> request buffer
  5292.     ES:DI -> reply buffer
  5293.     subfunction in third byte of request buffer
  5294.         00h set directory handle
  5295.         01h get directory path
  5296.         02h scan directory information
  5297.         03h get effective directory rights
  5298.         04h modify maximum rights mask
  5299.         05h get volume number
  5300.         06h get volume name
  5301.         0Ah create directory
  5302.         0Bh delete directory
  5303.         0Ch scan directory for trustees
  5304.         0Dh add trustee to directory
  5305.         0Eh delete trustee from directory
  5306.         0Fh rename directory
  5307.         10h purge erased files
  5308.         11h restore erased file
  5309.         12h allocate permanent directory handle
  5310.         13h allocate temporary directory handle
  5311.         14h deallocate directory handle
  5312.         15h get volume info with handle
  5313.         16h allocate special temporary directory handle
  5314.         17h retrieve a short base handle (Advanced NetWare 2.0)
  5315.         18h restore a short base handle (Advanced NetWare 2.0)
  5316.         19h set directory information
  5317. Return: AL = error code
  5318. ---------------------------------------------
  5319. INT 21 - OS/286, OS/386 - SET REAL PROCEDURE SIGNAL HANDLER
  5320.     AH = E2h
  5321.     ???
  5322. Return: ???
  5323. ---------------------------------------------
  5324. INT 21 - Novell NetWare 4.0 - CONNECTION CONTROL
  5325.     AH = E3h
  5326.     DS:SI -> requst buffer
  5327.     ES:DI -> reply buffer
  5328.     subfunction in third byte of request buffer
  5329.         00h login
  5330.         01h change password
  5331.         02h map user to station set
  5332.         03h map object to number
  5333.         04h map number to object
  5334.         05h get station's logged information
  5335.         06h get station's root mask (obsolete)
  5336.         07h map group name to number
  5337.         08h map number to group name
  5338.         09h get memberset M of group G
  5339.         0Ah enter login area
  5340.         0Bh ???
  5341.         0Ch ???
  5342.         0Dh log network message
  5343.         0Eh get disk utilization (Advanced NetWare 1.0)
  5344.         0Fh scan file information (Advanced NetWare 1.0)
  5345.         10h set file information (Advanced NetWare 1.0)
  5346.         11h get file server information (Advanced NetWare 1.0)
  5347.         12h ???
  5348.         13h get internet address (Advanced NetWare 1.02)
  5349.         14h login to file server (Advanced NetWare 2.0)
  5350.         15h get object connection numbers (Advanced NetWare 2.0)
  5351.         16h get connection information (Advanced NetWare 1.0)
  5352.         32h create object (Advanced NetWare 1.0)
  5353.         33h delete object (Advanced NetWare 1.0)
  5354.         34h rename object (Advanced NetWare 1.0)
  5355.         35h get object ID (Advanced NetWare 1.0)
  5356.         36h get object name (Advanced NetWare 1.0)
  5357.         37h scan object (Advanced NetWare 1.0)
  5358.         38h change object security (Advanced NetWare 1.0)
  5359.         39h create propery (Advanced NetWare 1.0)
  5360.         3Ah delete property (Advanced NetWare 1.0)
  5361.         3Bh change property security (Advanced NetWare 1.0)
  5362.         3Ch scan property (Advanced NetWare 1.0)
  5363.         3Dh read property value (Advanced NetWare 1.0)
  5364.         3Eh write property value (Advanced NetWare 1.0)
  5365.         3Fh verify object password (Advanced NetWare 1.0)
  5366.         40h change object password (Advanced NetWare 1.0)
  5367.         41h add object to set (Advanced NetWare 1.0)
  5368.         42h delete object from set (Advanced NetWare 1.0)
  5369.         43h is object in set? (Advanced NetWare 1.0)
  5370.         44h close bindery (Advanced NetWare 1.0)
  5371.         45h open bindery (Advanced NetWare 1.0)
  5372.         46h get bindery access level (Advanced NetWare 1.0)
  5373.         47h scan object trustee paths (Advanced NetWare 1.0)
  5374.         C8h check console priviledges
  5375.         C9h get file server description strings
  5376.         CAh set file server date and time
  5377.         CBh disable file server login
  5378.         CCh enable file server login
  5379.         CDh get file server login status
  5380.         CEh purge all erased files
  5381.         CFh disable transaction tracking
  5382.         D0h enable transaction tracking
  5383.         D1h send console broadcast
  5384.         D2h clear connection number
  5385.         D3h down file server
  5386.         D4h get file system statistics
  5387.         D5h get transaction tracking statistics
  5388.         D6h read disk cache statistics
  5389.         D7h get drive mapping table
  5390.         D8h read physical disk statistics
  5391.         D9h get disk channel statistics
  5392.         DAh get connection's task information
  5393.         DBh get list of connection's open files
  5394.         DCh get list of connections using a file
  5395.         DDh get physical record locks by connection and file
  5396.         DEh get physical record locks by file
  5397.         DFh get logical records by connection
  5398.         E0h get logical record information
  5399.         E1h get connection's semaphores
  5400.         E2h get semaphore information
  5401.         E3h get LAN driver's configuration information
  5402.         E5h get connection's usage statistics
  5403.         E6h get object's remaining disk space
  5404.         E7h get server LAN I/O statistics
  5405.         E8h get server miscellaneous information
  5406.         E9h get volume information
  5407. Return: AL = error code
  5408. ---------------------------------------------
  5409. INT 21 - OS/286, OS/386 - ISSUE REAL INTERRUPT
  5410.     AH = E3h
  5411.     ???
  5412. Return: ???
  5413. Note:    protected mode only???
  5414. ---------------------------------------------
  5415. INT 21 - Novell NetWare 4.0 - SET FILE ATTRIBUTES (FCB)
  5416.     AH = E4h
  5417.     CL = file attributes
  5418.         bit 0: read only
  5419.         1: hidden
  5420.         2: system
  5421.         7: shareable
  5422.     DX:DX -> FCB
  5423. Return: AL = error code
  5424. SeeAlso: AX=4301h
  5425. ---------------------------------------------
  5426. INT 21 - DoubleDos - INSTALLATION CHECK
  5427.     AX = E400h
  5428. Return: AL <> 00h if DoubleDos is active
  5429.     AL = 02h if caller is running in the invisible partition
  5430. ---------------------------------------------
  5431. INT 21 - OS/286, OS/386 - CHAIN TO REAL-MODE HANDLER
  5432.     AX = E400h
  5433.     ???
  5434. Return: ???
  5435. Note:    protected mode only???
  5436. ---------------------------------------------
  5437. INT 21 - OS/286, OS/386 - SET PROTECTED-MODE TASK GATE
  5438.     AX = E402h
  5439.     ???
  5440. Return: ???
  5441. Note:    protected mode only???
  5442. ---------------------------------------------
  5443. INT 21 - OS/286, OS/386 - REMOVE PROTECTED-MODE TASK GATE
  5444.     AX = E403h
  5445.     ???
  5446. Return: ???
  5447. Note:    protected mode only???
  5448. ---------------------------------------------
  5449. INT 21 - Novell NetWare 4.0 - UPDATE FILE SIZE (FCB)
  5450.     AH = E5h
  5451.     DS:DX -> FCB
  5452. Return: AL = error code
  5453. ---------------------------------------------
  5454. INT 21 - OS/286, OS/386 - HEAP MANAGEMENT STRATEGY
  5455.     AX = E500h
  5456.     ???
  5457. Return: ???
  5458. ---------------------------------------------
  5459. INT 21 - OS/286, OS/386 - FORCE HEAP COMPACTION
  5460.     AX = E501h
  5461.     ???
  5462. Return: ???
  5463. ---------------------------------------------
  5464. INT 21 - Novell NetWare 4.0 - COPY FILE TO FILE (FCB)
  5465.     AH = E6h
  5466.     CX:DX = number of bytes to copy
  5467.     DS:SI -> source FCB
  5468.     ES:DI -> destination FCB
  5469. Return: AL = error code
  5470. ---------------------------------------------
  5471. INT 21 - OS/286, OS/386 - ISSUE REAL PROCEDURE SIGNAL FROM PROTECTED MODE
  5472.     AH = E6h
  5473.     ???
  5474. Return: ???
  5475. Note:    protected mode only???
  5476. ---------------------------------------------
  5477. INT 21 - Novell NetWare 4.0, Banyan VINES - GET FILE SERVER DATE AND TIME
  5478.     AH = E7h
  5479.     DS:DX -> reply buffer
  5480.         BYTE  year - 1900
  5481.         BYTE  month
  5482.         BYTE  day
  5483.         BYTE  hours
  5484.         BYTE  minutes
  5485.         BYTE  seconds
  5486.         BYTE  day of week (0 = Sunday) (Novell only)
  5487. Return: AL = error code
  5488.         00h successful
  5489.         FFh unsuccessful
  5490. SeeAlso: AH=2Ah,2Ch
  5491. ---------------------------------------------
  5492. INT 21 - OS/286, OS/386 - CREATE CODE SEGMENT
  5493.     AH = E7h
  5494.     ???
  5495. Return: ???
  5496. ---------------------------------------------
  5497. INT 21 - Novell NetWare 4.6 - SET FCB RE-OPEN MODE
  5498.     AH = E8h
  5499.     DL = mode
  5500.         00h no automatic re-open
  5501.         01h auto re-open
  5502. Return: AL = error code
  5503. ---------------------------------------------
  5504. INT 21 - OS/286, OS/386 - SEGMENT CREATION
  5505.     AH = E8h
  5506.     AL = type
  5507.         00h data segment
  5508.         01h data window/alias
  5509.         02h real segment
  5510.         03h real window/alias
  5511.         06h shareable segment
  5512.     ???
  5513. Return: ???
  5514. ---------------------------------------------
  5515. INT 21 - Novell NetWare 4.6 - SHELL'S "GET BASE STATUS"
  5516.     AH = E9h
  5517.     AL = subfunction
  5518.         00h get directory handle
  5519.     DX = drive number to check (0 = A:)
  5520. Return: AL = network pathbase
  5521.     AH = base flags
  5522.         00h drive not currently mapped to a base
  5523.         01h drive is mapped to a permanent base
  5524.         02h drive is mapped to a temporary base
  5525.         03h drive exists locally
  5526. ---------------------------------------------
  5527. INT 21 - OS/286, OS/386 - CHANGE SEGMENTS
  5528.     AH = E9h
  5529.     AL = function
  5530.         01h change code segment parameters
  5531.         02h    change data segment parameters
  5532.         05h adjust segment limit
  5533.         06h change segment base address
  5534.     ???
  5535. Return: ???
  5536. Note:    protected mode only???
  5537. ---------------------------------------------
  5538. INT 21 - Novell NetWare 4.6 - RETURN SHELL VERSION
  5539.     AH = EAh
  5540.     AL = subfunction
  5541.         00h return code in AL
  5542.         Return: AL = hardware type
  5543.                 00h IBM PC
  5544.                 01h Victor 9000
  5545.         01h get workstation environment string
  5546.         ES:DI -> 40-byte buffer
  5547.         Return: buffer filled with three null-terminated entries:
  5548.             major operating system
  5549.             version
  5550.             hardware type
  5551. Return: AH = 00h if DOS
  5552. ---------------------------------------------
  5553. INT 21 - DoubleDOS - TURN OFF TASK SWITCHING
  5554.     AH = EAh
  5555. Return: task switching turned off
  5556. SeeAlso: AH=EBh"DoubleDOS"
  5557. ---------------------------------------------
  5558. INT 21 - OS/286, OS/386 - ALLOCATE HUGE SEGMENT
  5559.     AH = EAh
  5560.     ???
  5561. Return: ???
  5562. Note:    protected mode only???
  5563. ---------------------------------------------
  5564. INT 21 - Novell NetWare 4.6 - LOG FILE
  5565.     AH = EBh
  5566.     DS:DX -> ASCIZ filename
  5567.     if function C6h lock mode 01h:
  5568.         AL = flags
  5569.         00h log file only
  5570.         01h lock as well as log file
  5571.         BP = timeout in timer ticks (1/18 second)
  5572. Return: AL = error code
  5573. ---------------------------------------------
  5574. INT 21 - DoubleDOS - TURN ON TASK SWITCHING
  5575.     AH = EBh
  5576. Return: task switching turned on
  5577. SeeAlso: AH=EAh"DoubleDOS"
  5578. ---------------------------------------------
  5579. INT 21 - OS/386 VMM - GET A PAGE TABLE ENTRY BY LINEAR ADDRESS
  5580.     AX = EB00h
  5581.     ???
  5582. Return: ???
  5583. Note:    protected mode only???
  5584. ---------------------------------------------
  5585. INT 21 - OS/386 VMM - GET A PAGE TABLE ENTRY BY 16-BIT SEGMENT:OFFSET
  5586.     AX = EB02h
  5587.     ???
  5588. Return: ???
  5589. Note:    protected mode only???
  5590. ---------------------------------------------
  5591. INT 21 - OS/386 VMM - FREE MAPPED PAGES
  5592.     AX = EB03h
  5593.     ???
  5594. Return: ???
  5595. Note:    protected mode only???
  5596. ---------------------------------------------
  5597. INT 21 - OS/386 VMM - GET A PAGE TABLE ENTRY BY 32-BIT SEGMENT:OFFSET
  5598.     AX = EB04h
  5599.     ???
  5600. Return: ???
  5601. Note:    protected mode only???
  5602. ---------------------------------------------
  5603. INT 21 - OS/386 VMM - MAP PAGES
  5604.     AX = EB05h
  5605.     ???
  5606. Return: ???
  5607. Note:    protected mode only???
  5608. ---------------------------------------------
  5609. INT 21 - OS/386 VMM - LOCK PAGES IN MEMORY
  5610.     AX = EB06h
  5611.     ???
  5612. Return: ???
  5613. Note:    protected mode only???
  5614. ---------------------------------------------
  5615. INT 21 - OS/386 VMM - UNLOCK MEMORY PAGES
  5616.     AX = EB07h
  5617.     ???
  5618. Return: ???
  5619. Note:    protected mode only???
  5620. ---------------------------------------------
  5621. INT 21 - Novell NetWare 4.6 - RELEASE FILE
  5622.     AH = ECh
  5623.     DS:DX -> ASCIZ filename
  5624. Return: none
  5625. ---------------------------------------------
  5626. INT 21 - DoubleDOS - GET VIRTUAL SCREEN ADDRESS
  5627.     AH = ECh
  5628. Return: ES = segment of virtual screen
  5629. Note:    screen address can change if task-switching is on!!
  5630. ---------------------------------------------
  5631. INT 21 - OS/286, OS/386 - BLOCK TRANSFER
  5632.     AH = ECh
  5633.     ???
  5634. Return: ???
  5635. ---------------------------------------------
  5636. INT 21 - Novell NetWare - CLEAR FILE
  5637.     AH = EDh
  5638.     DS:DX -> ASCIZ filename
  5639. Return: AL = error code
  5640. ---------------------------------------------
  5641. INT 21 - OS/286, OS/386 - GET SEGMENT OR WINDOW DESCRIPTOR
  5642.     AH = EDh
  5643.     ???
  5644. Return: ???
  5645. Note:    protected mode only???
  5646. ---------------------------------------------
  5647. INT 21 - Novell NetWare 4.6 - GET PHYSICAL STATION NUMBER
  5648.     AH = EEh
  5649. Return: CX:BX:AX = six-byte address
  5650. ---------------------------------------------
  5651. INT 21 - DoubleDOS - GIVE AWAY TIME TO OTHER TASKS
  5652.     AH = EEh
  5653.     AL = number of 55ms time slices to give away
  5654. Return: returns after giving away time slices
  5655. ---------------------------------------------
  5656. INT 21 - Novell Advanced NetWare 1.0+ - GET DRIVE INFO
  5657.     AH = EFh
  5658.     AL = subfunction
  5659.         00h get drive handle table
  5660.         01h get drive flag table
  5661.         02h get drive connection ID table
  5662.         03h get connection ID table
  5663.         04h get file server name table
  5664. Return: ES:DI -> shell status table
  5665. ---------------------------------------------
  5666. INT 21 - Novell Advanced NetWare 1.0+ - CONNECTION ID
  5667.     AH = F0h
  5668.     AL = subfunction
  5669.         00h set preferred connection ID
  5670.         01h get preferred connection ID
  5671.         02h get default connection ID
  5672.         03h LPT capture active
  5673.         04h set primary connection ID
  5674.         05h get primary connection ID
  5675.     DL = preferred file server
  5676. Return: AL = selected file server
  5677. ---------------------------------------------
  5678. INT 21 - Novell Advanced NetWare 1.0+ - FILE SERVER CONNECTION
  5679.     AH = F1h
  5680.     AL = subfunction
  5681.         00h attach to file server
  5682.         DL = preferred file server
  5683.         01h detach from file server
  5684.         02h logout from file server
  5685. Return: AL = completion code
  5686. ---------------------------------------------
  5687. INT 21 - Novell NetWare - ???
  5688.     AH = F2h
  5689.     ???
  5690. Return: ???
  5691. ---------------------------------------------
  5692. INT 21 - Novell Advanced NetWare 2.0+ - FILE SERVER FILE COPY
  5693.     AH = F3h
  5694.     ES:DI -> request string (see below)
  5695. Return: AL = status/error code
  5696.     CX:DX = number of bytes copied
  5697.  
  5698. Format of request string:
  5699. Offset    Size    Description
  5700.  00h    WORD    source file handle
  5701.  02h    WORD    destination file handle
  5702.  04h    DWORD    starting offset in source
  5703.  08h    DWORD    starting offset in destination
  5704.  0Ch    DWORD    number of bytes to copy
  5705. ---------------------------------------------
  5706. INT 21 - DOS v??? - SET OEM INT 21 HANDLER
  5707.     AH = F8h
  5708.     DS:DX -> OEM INT 21 handler for functions F9h to FFh
  5709.          FFFFh:FFFFh resets to original handlers
  5710.  
  5711. Notes:    calls to AH=F9h through AH=FFH will return CF set and AX=1 (invalid
  5712.       function) if no handler set
  5713.     handler is called with all registers exactly as set by caller, and
  5714.       should exit with IRET
  5715. ---------------------------------------------
  5716. INT 21 - DOS v??? - OEM FUNCTION
  5717.     AH = F9h
  5718. ---------------------------------------------
  5719. INT 21 - DOS v??? - OEM FUNCTION
  5720.     AH = FAh
  5721. ---------------------------------------------
  5722. INT 21 - DOS v??? - OEM FUNCTION
  5723.     AH = FBh
  5724. ---------------------------------------------
  5725. INT 21 - DOS v??? - OEM FUNCTION
  5726.     AH = FCh
  5727. ---------------------------------------------
  5728. INT 21 - DOS v??? - OEM FUNCTION
  5729.     AH = FDh
  5730. ---------------------------------------------
  5731. INT 21 - DOS v??? - OEM FUNCTION
  5732.     AH = FEh
  5733. ---------------------------------------------
  5734. INT 21 - PCMag PCMANAGE/DCOMPRES - INSTALLATION CHECK
  5735.     AX = FEDCh
  5736. Return: AX = CDEFh if installed
  5737. SeeAlso: AH=DCh
  5738. ---------------------------------------------
  5739. INT 21 - DOS v??? - OEM FUNCTION
  5740.     AH = FFh
  5741. ---------------------------------------------
  5742. INT 21 - CED - INSTALLABLE COMMANDS
  5743.     AH = FFh
  5744.     AL = 00h add installable command
  5745.            BL = mode - bit 0 = 1 callable from DOS prompt
  5746.                bit 1 = 1 callable from application
  5747.            DS:SI -> CR-terminated command name
  5748.            ES:DI -> FAR routine entry point
  5749.     AL = 01h remove installable command
  5750.            DS:SI -> CR-terminated command name
  5751.     AL = 02h reserved, may be used to test for CED installation
  5752. Return: CF set on error
  5753.         AX = 01h invalid function
  5754.          02h command not found (subfunction 01h only)
  5755.          08h insufficient memory (subfunction 00h only)
  5756.          0Eh bad data (subfunction 00h only)
  5757.     AH = 0FFh if CED not installed
  5758. ---------------------------------------------
  5759. INT 22 - DOS - TERMINATE ADDRESS
  5760.    FAR (DWORD) address to jump to when program "returns to DOS".  Normally
  5761.    points at the instruction immediately following INT 21/AH=4Bh call which
  5762.    loaded the current program.    Should NEVER be called directly.
  5763. SeeAlso: INT 20, INT 21/AH=00h,31h,4Ch
  5764. ---------------------------------------------
  5765. INT 23 - DOS - CONTROL "C" EXIT ADDRESS
  5766.    Automatically called by DOS when CTRL-C or CTRL-BREAK is detected. Normally
  5767.    aborts program and returns to DOS, but may be changed.
  5768. SeeAlso: INT 1B
  5769. ---------------------------------------------
  5770. INT 24 - DOS - FATAL ERROR HANDLER ADDRESS
  5771.    Automatically called upon detection of unrecoverable I/O error.
  5772.    Normally points to routine in resident part of COMMAND.COM that prints
  5773.    "Abort, Retry, Ignore?" message and takes the reply, but may be overridden
  5774.    if desired.
  5775.  
  5776. Provides the following values in registers on entry to interrupt handler:
  5777.     AH: bit 7 = 0 disk I/O error
  5778.           = 1 other error -- if block device, bad FAT
  5779.                   -- if char device, code in DI
  5780.         bit 6  unused
  5781.         bit 5 = 1 if Ignore allowed, 0 if not (DOS 3+)
  5782.         bit 4 = 1 if Retry allowed, 0 if not (DOS 3+)
  5783.         bit 3 = 1 if Fail allowed, 0 if not (DOS 3+)
  5784.         bit 2 \ disk area of error    00 = DOS area  01 = FAT
  5785.         bit 1 /            10 = root dir  11 = data area
  5786.         bit 0 = 1 if write, 0 if read
  5787.     AL = drive number if AH bit 7 = 1, otherwise undefined
  5788.     BP:SI -> header of device driver for which error occurred
  5789.         block device if high bit of BP:[SI+4] set
  5790.     low byte of DI:
  5791.        00h write-protect error
  5792.        01h unknown unit
  5793.        02h drive not ready
  5794.        03h unknown command
  5795.        04h data error (bad CRC)
  5796.        05h bad request structure length
  5797.        06h seek error
  5798.        07h unknown media type
  5799.        08h sector not found
  5800.        09h printer out of paper
  5801.        0Ah write fault
  5802.        0Bh read fault
  5803.        0Ch general failure
  5804.        0Dh (DOS 3+) sharing violation
  5805.        0Eh (DOS 3+) lock violation
  5806.        0Fh (DOS 3+) invalid disk change
  5807.        10h (DOS 3+) FCB unavailable
  5808.        11h (DOS 3+) sharing buffer overflow
  5809. Handler must return
  5810.     AL = 00h ignore error
  5811.        = 01h retry operation
  5812.        = 02h terminate program through INT 22h
  5813.        = 03h fail system call in progress (DOS 3+)
  5814. Notes:    for DOS 3.1+, IGNORE (AL=00h) is turned into FAIL (AL=03h) on network
  5815.       critical errors
  5816.     if IGNORE specified but not allowed, it is turned into FAIL
  5817.     if RETRY specified but not allowed, it is turned into FAIL
  5818.     if FAIL specified but not allowed, it is turned into ABORT
  5819. ---------------------------------------------
  5820. INT 25 - DOS - ABSOLUTE DISK READ (except DOS 4.0/COMPAQ DOS 3.31 >32M partitn)
  5821.     AL = drive number (0=A, 1=B, etc)
  5822.     DS:BX = Disk Transfer Address (buffer)
  5823.     CX = number of sectors to read
  5824.     DX = first relative sector to read
  5825. Return: CF set on error
  5826.         AL = error code issued to INT 24h in low half of DI
  5827.         AH = 80h if attachment failed to respond
  5828.          40h if seek operation failed
  5829.          20h if controller failed
  5830.          10h if data error (bad CRC)
  5831.          08h if DMA failure
  5832.          04h if requested sector not found
  5833.          03h if write-protected disk (INT 26 only)
  5834.          02h if bad address mark
  5835.          01h if bad command
  5836.     CF clear if successful
  5837.         AL = 00h
  5838. Notes:    ORIGINAL FLAGS ON STACK!  Must be popped or discarded by adjusting SP
  5839.     May destroy all registers except segment regs
  5840. BUG:    DOS 3.1 through 3.3 set the word at ES:[BP+1Eh] to FFFFh if AL is an
  5841.     invalid drive number
  5842. SeeAlso: INT 26, INT 13/AH=02h
  5843. ---------------------------------------------
  5844. INT 25 - DOS 4.0/COMPAQ DOS 3.31 - ABSOLUTE DISK READ (>32M hard-disk partitn)
  5845.     AL = drive number (0=A, 1=B, etc)
  5846.     CX = FFFFh
  5847.     DS:BX -> disk read packet (see below)
  5848. Return: same as above
  5849. Notes:    partition is potentially >32M (and requires this form of the call) if
  5850.       bit 1 of device attribute word in device driver is set
  5851.     ORIGINAL FLAGS LEFT ON STACK! Must be popped or discarded by adj SP
  5852. SeeAlso: INT 26, INT 13/AH=02h
  5853.  
  5854. Format of disk read packet:
  5855. Offset    Size    Description
  5856.  00h    DWORD    sector number
  5857.  04h    WORD    number of sectors to read
  5858.  06h    DWORD    transfer address
  5859. ---------------------------------------------
  5860. INT 26 - DOS - ABSOLUTE DISK WRITE (except DOS 4.0/COMPAQ DOS 3.31 >32M partn)
  5861.     AL = drive number (0=A, 1=B, etc)
  5862.     DS:BX = Disk Transfer Address (buffer)
  5863.     CX = number of sectors to write
  5864.     DX = first relative sector to write
  5865. Return: CF set on error
  5866.         AL = error code issued to INT 24h in low half of DI
  5867.         AH = same error codes as for INT 25h
  5868.     CF clear if successful
  5869.         AL = 00h
  5870. Note:    ORIGINAL FLAGS ON STACK!  Must be popped or discarded by adjusting SP
  5871. BUG:    DOS 3.1 through 3.3 set the word at ES:[BP+1Eh] to FFFFh if AL is an
  5872.     invalid drive number
  5873. SeeAlso: INT 25, INT 13/AH=03h
  5874. ---------------------------------------------
  5875. INT 26 - DOS 4.0/COMPAQ DOS 3.31 - ABSOLUTE DISK WRITE (>32M hard-disk partitn)
  5876.     AL = drive number (0=A, 1=B, etc)
  5877.     CX = FFFFh
  5878.     DS:BX -> disk write packet (see below)
  5879. Return: same as above
  5880. Notes:    partition is potentially >32M (and requires this form of the call) if
  5881.       bit 1 of device attribute word in device driver is set
  5882.     ORIGINAL FLAGS LEFT ON STACK!  Must be popped or discarded by adj SP
  5883. SeeAlso: INT 25, INT 13/AH=03h
  5884.  
  5885. Format of disk write packet:
  5886. Offset    Size    Description
  5887.  00h    DWORD    sector number
  5888.  04h    WORD    number of sectors to read
  5889.  06h    DWORD    transfer address
  5890. ---------------------------------------------
  5891. INT 27 - DOS - TERMINATE BUT STAY RESIDENT
  5892.     CS = current program segment
  5893.     DX = last program byte + 1
  5894. Return: never
  5895. Note:    this is an obsolete call
  5896. SeeAlso: INT 21/AH=31h
  5897. ---------------------------------------------
  5898.